diff --git a/tests/weakref_006.phpt b/tests/weakref_006.phpt index 93cc972..5d95d11 100644 --- a/tests/weakref_006.phpt +++ b/tests/weakref_006.phpt @@ -1,5 +1,5 @@ --TEST-- -Weakref: Destroying the weakred within the std dtor of the object +Weakref: Destroying the weakref within the std dtor of the object --FILE-- +--FILE-- +ref = array($a); + } + + function __destruct() { + printf("Destroy B\n"); + var_dump($this->ref->valid()); + } + } + function doit() { + $a = new A(); + $b = new B($a); + crash(); + } + $pid = pcntl_fork(); + if($pid == 0) { + doit(); + exit(0); + } + pcntl_waitpid($pid, $status); + if(pcntl_wifsignaled($status)) { + echo "Killed: ". pcntl_wtermsig($status) ."\n"; + } elseif(pcntl_wifexited($status)) { + echo "Exit: ". pcntl_wexitstatus($status) ."\n"; + } else { + echo "Weird.\n"; + } +?> +--EXPECTF-- + +Fatal error: Call to undefined function crash() in %s on line %d +Exit: 255