We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ea9c68 commit b7764dcCopy full SHA for b7764dc
Zend/tests/varSyntax/new_instanceof_expr.phpt
@@ -4,8 +4,8 @@ new with an arbitrary expression
4
<?php
5
6
$class = 'class';
7
-var_dump(new {'std'.$class});
8
-var_dump(new {'std'.$class}());
+var_dump(new ('std'.$class));
+var_dump(new ('std'.$class)());
9
$obj = new stdClass;
10
var_dump($obj instanceof ('std'.$class));
11
Zend/zend_language_parser.y
@@ -1084,7 +1084,7 @@ instanceof_class_name:
1084
new_class_name:
1085
class_name { $$ = $1; }
1086
| new_variable { $$ = $1; }
1087
- | '{' expr '}' { $$ = $2; }
+ | '(' expr ')' { $$ = $2; }
1088
;
1089
1090
exit_expr:
0 commit comments