mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
32 lines
471 B
PHP
32 lines
471 B
PHP
--TEST--
|
|
SPL: spl_autoload() and object freed
|
|
--INI--
|
|
include_path=.
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
public $var = 1;
|
|
public function autoload() {
|
|
echo "var:".$this->var."\n";
|
|
}
|
|
public function __destruct() {
|
|
echo "__destruct__\n";
|
|
}
|
|
}
|
|
|
|
$a = new A;
|
|
$a->var = 2;
|
|
|
|
spl_autoload_register(array($a, 'autoload'));
|
|
unset($a);
|
|
|
|
var_dump(class_exists("C", true));
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECTF--
|
|
var:2
|
|
bool(false)
|
|
===DONE===
|
|
__destruct__
|