Almighty Zeus, please smite PHP and all code written in it from all the records of humanity. This language is too disgusting and wrong to be used by anyone, ever.
Good code uses small functions that do a simple thing, then you combine those functions , it will look similar for most programming languages
Why are web engineers snobs? Get the job done and move on.