Test: /Zend/tests/bug54039.phpt - Version 7.2.0-dev        

Bug #54039 use() of static variables in lambda functions can break staticness
Submitted: 2011-02-18 00:49:00 Modified: 2011-04-08 12:03:21
From: a Assigned: dmitry
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3.5 OS: Windows XP

There is 1 diff reported by users for this test.

Count Diff
17 (100%)
001+ Fatal error: Uncaught TypeError: Cannot assign integer to reference of type unknown in %s/bug54039.php:4
002+ Stack trace:
003+ #0 %s/bug54039.php(12): test_1()
004+ #1 {main}
005+ thrown in %s/bug54039.php on line 4
001- Outer function increments $v to 1
002- Inner function reckons $v is 1
003- Outer function increments $v to 2
004- Inner function reckons $v is 2
005- Outer function increments $v to 1
006- Inner function reckons $v is 0
007- Outer function increments $v to 2
008- Inner function reckons $v is 1
009- Outer function catenates 'b' onto $v to give b
010- Outer function catenates 'a' onto $v to give ba
011- Inner function reckons $v is b
012- Outer function catenates 'b' onto $v to give bab
013- Outer function catenates 'a' onto $v to give baba
014- Inner function reckons $v is bab