News Feed
Sections




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

Anthony Ferrara's Blog:
PHP's Source Code For PHP Developers - Part 3 - Variables
March 22, 2012 @ 08:30:45

The third part of the "PHP source for developers" series has been posted over on Anthony Ferrara's blog today looking at the variables PHP's internals use.

In this third post of the PHP's Source Code for PHP Developers series, we're going to expand on the prior posts to help understand how PHP works internally. In the first post of the series, we looked at how to view PHP's source code, how it's structured as well as some basic C pointers for PHP developers. The second post introduced functions into the mix. This time around, we're going to dive into one of the most useful structures in PHP: variables.

He starts with one of the most important variable types used in PHP's source - the ZVAL. This is one of the keys to PHP's loose typing and can be thought of as "a class with only public properties". He gets into more detail with the properties of this "class" (value, refcount__gc, type and is_ref__gc). Also included is a look at how it's actually used - creating new ones, getting the value of them, converting their types and how the internal PHP functions parse their variables.

There's a lot more covered about variables in the post so if this is interesting stuff to you, be sure to read it all. They've done a great job of explaining one of the more complicated parts of the internals that power PHP.

0 comments voice your opinion now!
source code internals language variables parse type zval


blog comments powered by Disqus

Similar Posts

PHP-Tools Blog: Analyzing aide (advanced intrusion detection environment) output with PHP

PHP.net: PHP 5.5.0RC1 is available

Gareth Heyes' Blog: Non alphanumeric code in PHP

The Nerdery: Is my code compatible with PHP 5.4 or 5.5?

Nexen.net: Sudoku in PHP


Community Events

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


release example language video podcast php7 list community version introduction library api voicesoftheelephpant unittest series laravel5 opinion interview laravel framework

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