Annotation of embedaddon/php/ext/spl/tests/spl_autoload_011.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SPL: spl_autoload() and object freed
                      3: --INI--
                      4: include_path=.
                      5: --FILE--
                      6: <?php
                      7: class A {
                      8:     public $var = 1;
                      9:     public function autoload() {
                     10:         echo "var:".$this->var."\n";
                     11:     }
                     12:     public function __destruct() {
                     13:         echo "__destruct__\n";
                     14:     }
                     15: }
                     16: 
                     17: $a = new A;
                     18: $a->var = 2;
                     19: 
                     20: spl_autoload_register(array($a, 'autoload'));
                     21: unset($a);
                     22: 
                     23: var_dump(class_exists("C", true));
                     24: ?>
                     25: ===DONE===
                     26: <?php exit(0); ?>
                     27: --EXPECTF--
                     28: var:2
                     29: bool(false)
                     30: ===DONE===
                     31: __destruct__

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>