php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33895 Constants introduced in 4.0.2 not defined
Submitted: 2005-07-27 23:34 UTC Modified: 2006-08-27 19:15 UTC
From: gpelleti at matrox dot com Assigned: bjori (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5.1.0b3 OS: Windows
Private report: No CVE-ID: None
 [2005-07-27 23:34 UTC] gpelleti at matrox dot com
Description:
------------
Math constants M_SQRTPI, M_SQRT3, M_LNPI and M_EULER introduced in version 4.0.2 are not defined anymore in version 5.1.0b3.

Reproduce code:
---------------
echo 'M_SQRTPI=' . M_SQRTPI . '<br />' . "\n";
echo 'M_SQRT3=' . M_SQRT3 . '<br />' . "\n";
echo 'M_LNPI=' . M_LNPI . '<br />' . "\n";
echo 'M_EULER=' . M_EULER . '<br />' . "\n";


Expected result:
----------------
M_SQRTPI=1.7724538509055
M_SQRT3=1.7320508075689
M_LNPI=1.1447298858494
M_EULER=0.57721566490153

Actual result:
--------------
Notice: Use of undefined constant M_SQRTPI - assumed 'M_SQRTPI' in c:\Inetpub\wwwroot\php\math.php on line 23
M_SQRTPI=M_SQRTPI

Notice: Use of undefined constant M_SQRT3 - assumed 'M_SQRT3' in c:\Inetpub\wwwroot\php\math.php on line 24
M_SQRT3=M_SQRT3

Notice: Use of undefined constant M_LNPI - assumed 'M_LNPI' in c:\Inetpub\wwwroot\php\math.php on line 25
M_LNPI=M_LNPI

Notice: Use of undefined constant M_EULER - assumed 'M_EULER' in c:\Inetpub\wwwroot\php\math.php on line 26
M_EULER=M_EULER

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-28 16:43 UTC] sniper@php.net
Those haven't been defined as PHP constants in any PHP version, not even in 4.0.2 (they exist only in the php_math.h file)

Moved to Feature requests.

 [2006-08-27 19:15 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5_2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC