1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
DanielEScherzer a50f82bebf Zend/tests: organize some tests with sub directories (6) (#17807)
Move more tests into existing directories

Work towards GH-15631
2025-02-15 14:55:07 +00:00

33 lines
564 B
PHP

--TEST--
Scoping in destructor call
--FILE--
<?php
class T
{
private $var = array();
public function add($a)
{
array_push($this->var, $a);
}
public function __destruct()
{
print_r($this->var);
}
}
class TT extends T
{
}
$t = new TT();
$t->add("Hello");
$t->add("World");
?>
--EXPECT--
Array
(
[0] => Hello
[1] => World
)