mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
24 lines
318 B
PHP
24 lines
318 B
PHP
--TEST--
|
|
Bug #24573 (debug_backtrace() crashes if $this is set to null)
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
function Bar() {
|
|
$__this = $this;
|
|
$this = null;
|
|
debug_backtrace();
|
|
$this = $__this;
|
|
}
|
|
}
|
|
|
|
$f = new Foo;
|
|
|
|
$f->Bar();
|
|
|
|
echo "OK\n";
|
|
|
|
?>
|
|
--EXPECTF--
|
|
|
|
Fatal error: Cannot re-assign $this in %s on line %d
|