From:             patrickdk at patrickdk dot com
Operating system: Ubuntu
PHP version:      5.2.11
PHP Bug Type:     Scripting Engine problem
Bug description:  global vs static usage

Description:
------------
the global modifier causes http 500 errors but doesn't produce any syntax
errors or other messages when used incorrectly. It's behavure isn't
documented and is described next to static that works differently.

Reproduce code:
---------------
<?php global $test=true;


Expected result:
----------------
It should give a syntax error, and manual should be updates to explain
assigning a value on the global declaration isn't valid, unlike with
static.


Actual result:
--------------
php-cgi test.php 

Status: 500 Internal Server Error
X-Powered-By: PHP/5.2.11
Content-type: text/html



-- 
Edit bug report at http://bugs.php.net/?id=49713&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49713&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49713&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49713&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49713&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49713&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49713&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49713&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49713&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49713&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49713&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49713&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49713&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49713&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49713&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49713&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49713&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49713&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49713&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49713&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49713&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49713&r=mysqlcfg

Reply via email to