Revert "Integrated layout in PHP"

This reverts commit 100bb81a78f676dd713a14cd51ac9f80db4a9124.
Revert "Revert "Integrated layout in PHP""

This reverts commit 15d4fd3d183d774386b1315491195b511d33db41.