News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
PHP's two-pass compiler
January 28, 2009 @ 12:06:34

While working on an issue with debugging a script of his via XDebug, Derick Rethans was reminded of something that is an integral part of the PHP language - its two phase compiler.

During the first pass, it will find out to which opcode it needs to jump in the jump instructions. However, the PHP engine (and Xdebug) expects a memory address to jump to while executing your script. In the second pass, the compiler will then go over the generated opcodes and calculate the memory address to jump to from the jumps to opcode numbers.

Because of the way that XDebug was handling the checks (with the user-defined error handler) and how the opcodes inside of PHP are handled, the user-defined handler happened in between the first and second phases and the latter run couldn't find the resources it was looking for, thus the crash.

0 comments voice your opinion now!
two phase compiler xdebux vld userdefined error handler opcode resource


blog comments powered by Disqus

Similar Posts

Bard Farstad's Blog: Optimizing Apache, PHP and APC for Intel based Mac

Pádraic Brady's Blog: One insecure PHP app too many?

NetTuts.com: Quick Tip: Email Error Logs with PHP

DevShed: Developing a Modular Class For a PHP File Uploader

Douglas Brown's Blog: Quick Methods Used for Solving PHP Errors


Community Events

Don't see your event here?
Let us know!


podcast introduction video community psr7 framework language unittest conference laravel library opinion laravel5 release extension voicesoftheelephpant series development api interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework