Skip to content

Instantly share code, notes, and snippets.

@Calak
Created August 12, 2011 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Calak/1141586 to your computer and use it in GitHub Desktop.
Save Calak/1141586 to your computer and use it in GitHub Desktop.
php5.4.0-alpha3 bug...
[notice] Parent: child process exited with status 3221225477 -- Restarting.
<?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