summaryrefslogtreecommitdiff
path: root/Zend/tests/varSyntax/parenthesesDeref.phpt
blob: 0ebfe9c5d7206eea38dfc9fb3c7c67ac1425a27a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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)