Skip to content
Advertisement

Tag: language-construct

Where is PHP echo implemented in the source?

You can lookup built-in functions by searching for e.g. PHPAPI(stream_copy_to_stream) and find the implementation in ext/standard/streamsfuncs.c. How to do that for a language construct like echo? I found it is associated with T_ECHO in Zend/zend_language_parser.y but couldn’t trace how it works from there. Where does Zend Engine implement echo functionality? Answer Given this example program: We can obtain the opcodes

Advertisement