Edit report at https://bugs.php.net/bug.php?id=55829&edit=1

 ID:                 55829
 User updated by:    cizek dot milan at seznam dot cz
 Reported by:        cizek dot milan at seznam dot cz
 Summary:            impossible to define a variable S_ALL
 Status:             Bogus
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   FreeBSD 8.0-RELEASE
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Yes, you're right.
S_ALL defined in Suhosin-patch (5.3.8-0.9.10), in the file zend_errors.h.diff

 + # define S_ALL (S_MEMORY | S_VARS | S_INCLUDE | S_FILES | S_MAIL | S_SESSION 
| S_MISC | S_SQL | S_EXECUTOR)

this is the cause? Thanks.


Previous Comments:
------------------------------------------------------------------------
[2011-10-02 13:03:40] johan...@php.net

Somewhere else you already have defined S_ALL. So what you are doing is to 
register a constant using the value of S_ALL as name.  So will have a constant 
511.

Try this:

define (S_ALL, 'All');
echo constant("511");

When declaring a constant the first paramter has to be a string with the name, 
so put it in quites.

define ('S_ALL', 'All');

Will give you an error.

The palce where S_ALL, most likely, is being defined is in the suhoshin 
extension your system seems to use.

------------------------------------------------------------------------
[2011-10-02 12:50:56] cizek dot milan at seznam dot cz

When I assign any value to S_ALL, the value is always 511. Example script...

<?php
define (S_ALL,'Hi');
echo S_ALL;  //511
define (S_ALL,'asd');
echo S_ALL;  //511
?>

FreeBSD 8.0-RELEASE-p3 #0, with php5-5.3.8

------------------------------------------------------------------------
[2011-10-02 04:15:52] larue...@php.net

what do you mean by impossible to define a S_ALL?
 
<?php
define ("S_ALL", "511");
echo S_ALL;
?>

this works fine to  me.

------------------------------------------------------------------------
[2011-10-02 04:15:42] larue...@php.net

what do you mean by impossible to define a S_ALL?
 
<?php
define ("S_ALL", "511");
echo S_ALL;
?>

this works fine to  me.

------------------------------------------------------------------------
[2011-10-02 00:24:45] cizek dot milan at seznam dot cz

Description:
------------
---
>From manual page: http://www.php.net/function.define
---

I searched in predefined S_ALL constants and variables, but I did not find 
anything.

Test script:
---------------
<?php
  define (S_ALL, 'All');
  echo S_ALL;
?>

Expected result:
----------------
511



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55829&edit=1

Reply via email to