php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #34049 php.net/constant missing info about class constants
Submitted: 2005-08-09 14:50 UTC Modified: 2005-09-20 15:25 UTC
From: php dot net at sharpdreams dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php dot net at sharpdreams dot com
New email:
PHP Version: OS:

 

 [2005-08-09 14:50 UTC] php dot net at sharpdreams dot com
Description:
------------
http://php.net/constant page should have a short tidbit explaining that constant() can be used with class constants, too:

<?php
  print constant( "Client::STATUS_SUSPENDED" );
?>

works fine.

[[ There is a comment regarding this in the manual, but not all users read comments, and it is always better to have official information. ]]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-20 15:25 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"This function works also with class constants."

Note deleted.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Sep 10 02:00:01 2026 UTC