HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 69490 thumbnail
User 111696 avatar

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).
  • 7
  • 1
  • 1373
  • 0

Comments

Add your comment
User 59996 avatar

sky_HALud replied ago:

0 votes Vote down Vote up Reply

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.

User 233461 avatar

antych replied ago:

0 votes Vote down Vote up Reply

"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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (1)