mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
388624d359
and they will leak and cause failures unless gc is enabled
23 lines
333 B
PHP
23 lines
333 B
PHP
--TEST--
|
|
Dereferencing expression parentheses
|
|
--INI--
|
|
zend.enable_gc=1
|
|
--FILE--
|
|
<?php
|
|
|
|
$array = [&$array, 1];
|
|
var_dump(($array)[1]);
|
|
var_dump((($array[0][0])[0])[1]);
|
|
|
|
var_dump(((object) ['a' => 0, 'b' => 1])->b);
|
|
|
|
$obj = (object) ['a' => 0, 'b' => ['var_dump', 1]];
|
|
(clone $obj)->b[0](1);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(1)
|
|
int(1)
|
|
int(1)
|