By bloid
via michaelkimsal.com
Published: Mar 06 2008 / 14:06
This issue came to hit me this morning when looking up info on class constants. The current PHP documentation located at http://us2.php.net/manual/en/language.oop5.constants.php has code displayed that doesn’t work. Specifically the concept of
$obj = new myObject();
echo $obj::constantName;
This simply doesn’t work in PHP 5.2.4 (and I assume 5.2.5).



Comments
sky_HALud replied ago:
I voted this up because it is a fine example of bad version management. As the author says, the online PHP documentation is for the current development of PHP. If you want to see or comment on specific documentation for, let's say, PHP 4.1.4, you just cannot. It's like not using any branches during the development of a multi-versioned product.
antych replied ago:
"As of PHP 5.3.0, it's possible to reference the class using a variable."
That's pretty much says it all. If you don't understand the documentation that's your problem.
Voters For This Link (7)
Voters Against This Link (1)