News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Derick Rethans' Blog:
More source analysis with VLD
February 23, 2010 @ 10:49:26

Derick Rethans has been working on some updates to a tool he's developed, VLD, to make it more helpful and effecting in optimizing the opcodes in your scripts and find the dead opcodes and paths. He talks about these updates in this recent post.

Recently I've been working on some new functionality to visualise all the code paths that make up each function. These new routines sit on top of the routines that do dead code analysis. These new routines sit on top of the routines that do dead code analysis. Every branch instruction (such as if, but also for and foreach) is analysed and a list of branches is created. [...] Once all the branches and their links are found, another algorithm runs to figure out which paths can be created out of all the branches.

He illustrates with a few examples, showing both the command that was executed and the resulting output with the new path information of a simple test file using a "for" loop and an "if/else" conditional.

0 comments voice your opinion now!
vld opcode visualize dead path


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


Derick Rethans' Blog:
New VLD and translit releases
April 03, 2008 @ 11:17:42

Derick Rethans has posted about new versions of two PHP extensions with "very distinctive purposes" - VLD and translit.

VLD is for the "hardcore hackers" out there to see what's happening behind the scenes for each request made to PHP and the translit extension makes it easier to "transliterate" information into other formats (with filters like "normalize_numbers" and converting text to Chinese).

You can grab the updated version through the standard pecl interface or from their pages on the PECL site.

0 comments voice your opinion now!
vld translit release pecl extension



Community Events











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


security facebook application symfony2 code example opinion podcast composer package overview language release install unittest hhvm hack introduction component framework

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