-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/src/php/ext/spl/tests/
File Upload :
Current File : //usr/src/php/ext/spl/tests/spl_autoload_011.phpt

--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__

Copyright © 2017 || Recoded By Mr.Bumblebee