#33280 [Opn->Bgs]: range() stops script without error when used in delcaring class member variable
| From: | iliaa@php.net | Date: | Wed, 08 Jun 2005 23:27:26 +0000 |
| Subject: | #33280 [Opn->Bgs]: range() stops script without error when used in delcaring class member variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80079@lists.php.net to get a copy of this message | ||
ID: 33280
Updated by: iliaa@php.net
Reported By: phpbugs at s8 dot org
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Linux 2.4.29
PHP Version: 4.3.10
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The code you've shown is invalid, you cannot set default property
values based on output of functions.
Previous Comments:
------------------------------------------------------------------------
[2005-06-08 23:50:42] phpbugs at s8 dot org
Description:
------------
When defining the initial value of a member variable of a class using
the range () function, the php script does not execute and no error
message is displayed. (I triple-checked that display_errors was set to
true.) If I take cut the line using range and move it outside of the
class definition (and remove the var keyword as well) the script
executes normally.
Reproduce code:
---------------
print ( "Hello" );
class test
{
var $test = array ( 1,2,3,4,5 );
var $test_too = range ( 1, 5 );
}
print ( " World!" );
Expected result:
----------------
"Hello World!" is printed out.
Actual result:
--------------
Blank page. No error messages, nothing. I don't even see "Hello"
printed to the screen.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33280&edit=1