mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
Add directories for tests relating to - `break` statements - functions with by-ref returns - `class_exists()` - dynamic properties - error handlers - error suppression with `@` - `get_object_vars()` - `highlight_string()` and `highlight_file()` - interfaces - `is_callable()` - iterators - shutdown functions - streams As well as organizing a couple of tests into existing sub directories along the way Work towards GH-15631
23 lines
265 B
PHP
23 lines
265 B
PHP
--TEST--
|
|
__debugInfo with reference return
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
private $tmp = ['x' => 1];
|
|
|
|
public function &__debugInfo(): array
|
|
{
|
|
return $this->tmp;
|
|
}
|
|
}
|
|
|
|
var_dump(new Test);
|
|
|
|
?>
|
|
--EXPECT--
|
|
object(Test)#1 (1) {
|
|
["x"]=>
|
|
int(1)
|
|
}
|