#49713 [Opn->Fbk]: global vs static usage
| From: | sjoerd@php.net | Date: | Wed, 30 Sep 2009 18:32:58 +0000 |
| Subject: | #49713 [Opn->Fbk]: global vs static usage | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143088@lists.php.net to get a copy of this message | ||
ID: 49713
Updated by: sjoerd@php.net
Reported By: patrickdk at patrickdk dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Ubuntu
PHP Version: 5.2.11
New Comment:
Thank you for your bug report.
Does this problem occur with all parse problems or just this one? Do
you have error reporting enabled? Is there something in your PHP error
log?
Previous Comments:
------------------------------------------------------------------------
[2009-09-29 16:34:09] patrickdk at patrickdk dot com
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 this bug report at http://bugs.php.net/?id=49713&edit=1