php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51805 There is no Errors/Exceptions section in constant() man
Submitted: 2010-05-13 05:19 UTC Modified: 2010-05-13 10:02 UTC
From: iliavlad at mail dot ru Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.2 OS: All
Private report: No CVE-ID: None
 [2010-05-13 05:19 UTC] iliavlad at mail dot ru
Description:
------------
There is no Errors/Exceptions section in constant() man, but when check undefined constant with constant("IDONOTEXIST") there is E_WARNING in logs.

Test script:
---------------
<?php
constant("IDONOTEXIST");
?>

Expected result:
----------------
Warning: constant(): Couldn't find constant IDONOTEXIST
NULL


Actual result:
--------------
Warning: constant(): Couldn't find constant IDONOTEXIST
NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-13 10:01 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=299326
Log: added errors section to constant() (closes bug #51805)
 [2010-05-13 10:02 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2010-05-13 10:02 UTC] salathe@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.

I added the Errors/Exception section noting that an E_WARNING is issued.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 16:00:02 2026 UTC