1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/Zend/tests/varSyntax/parenthesesDeref.phpt
2014-05-31 17:51:22 +02:00

21 lines
308 B
PHP

--TEST--
Dereferencing expression parentheses
--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)