i heard someone say that the purpose of scripting languages it to abastract out the low-level stuff...also if you look at how sites are developed you see that when sites want efficiency they switch from php to C++, C# or similar.
PHP is written in C. C compiles to assembly/machine code...so theoretically you should be able to think of PHP in terms of assembly if you knew how. Is there a way to view the assembly for PHP or does this go against the design pupose of a scripting language?
To say you have an advanced command of the language should you be able to view it in terms of assembly?
I have a general understanding of PHP class design on the high level but how low-level should one go with out "going against the design of the languge".
If there is a line where is it drawn? How do I convert php to assembly?
I'm asking the question b.c. I want to have an advanced knowledge of the language and I need to know if this would be a requirement.
For example, you could look up the php call in C. From there you could use gcc tools to view that assembly...but does anyone do this?
Yes, it is possible to convert PHP to assembly. Facebook was/is written in PHP. As Facebook grew, scale and performance became an issue, and so they created HipHop for PHP.
HipHop is a source code transformer which transforms PHP source code into highly optimized C++ and then compiles it using g++. Currently supported platforms are Linux and FreeBSD. There is no OS X support. (Source)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With