ID:               43855
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dzonny dot dz at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Class/Object related
 Operating System: Windows XP Pro SP2 CZ
 PHP Version:      5.2.5
 New Comment:

Cannot reproduce any problems.


Previous Comments:
------------------------------------------------------------------------

[2008-01-15 12:20:34] dzonny dot dz at gmail dot com

Description:
------------
Code below always makes my Apache (2.2) to crash.
It's class with static function. Thet static function creates instance
of the class and call some method on it. It also appends string to
static variable and produces output.
It is called in a loop 1000 times. When called 999 times - no crash.

The crash occurs AFTER the code is evaluated (it means when called
2500, there are 2500 outputs and the crash report).  

Reproduced also on Windows Vista Business EN, Apache 2.2.
NOT reproduced on any Linux I have access to.

Reproduce code:
---------------
class X{
public function __construct(){}
public static function DoSthStatic(){$inst=new
X();$inst->DoSth();return $inst;}
static $st;
public function DoSth(){
static $st;
@$st++;
echo "Done $st, ";
self::$st.="Some string like this;\r\n";
}
}
for($i=0;$i<1000;$i++)
X::DoSthStatic();

Expected result:
----------------
No crash.

Actual result:
--------------
Crash. 
The was an error in Apache HTP Server Application ... message.


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


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

Reply via email to