Created
August 12, 2011 06:43
-
-
Save Calak/1141586 to your computer and use it in GitHub Desktop.
php5.4.0-alpha3 bug...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[notice] Parent: child process exited with status 3221225477 -- Restarting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* trait.php | |
*/ | |
trait Foo { | |
function bar() { | |
$i = null; | |
$j = null; // <-- BAM! Crashed! I've tried " echo 'foobar'; " or | |
} // " if (true) { } " instead, but same result | |
} | |
?> | |
------------- | |
<?php | |
/** | |
* bug.php (entry point) | |
*/ | |
include __DIR__.'/trait.php'; | |
//trait Foo { // <-- note: if trait is hard coded in bug.php instead include, | |
// function bar() { // no more bug... O_o | |
// $i = null; | |
// $j = null; | |
// } | |
//} | |
class StupidBug { | |
use \Foo; | |
} | |
$a = new \StupidBug(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment