Skip to content

Commit c3ad3d8

Browse files
committed
minor #4234 [7.3] Test that "LITERAL instanceof X" is valid (guilliamxavier)
This PR was merged into the 2.12 branch. Discussion ---------- [7.3] Test that "LITERAL instanceof X" is valid Refs #3697 Commits ------- 5390f84 [7.3] Test that "LITERAL instanceof X" is valid
2 parents 4e56b05 + 5390f84 commit c3ad3d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Fixtures/Integration/misc/PHP7_3.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ is_countable($foo);
3737
// https://wiki.php.net/rfc/list_reference_assignment
3838
[$a, &$b] = $array; // `list_syntax` rule
3939

40+
// https://github.com/php/php-src/pull/2978 instanceof now allows literals as the first operand (the result is always false).
41+
null instanceof \stdClass;
42+
4043
// https://wiki.php.net/rfc/trailing-comma-function-calls Trailing commas in function and method calls are now allowed.
4144
foo(
4245
$arg,
@@ -91,6 +94,9 @@ IS_COUNTABLE($foo);
9194
// https://wiki.php.net/rfc/list_reference_assignment
9295
list($a, &$b) = $array; // `list_syntax` rule
9396

97+
// https://github.com/php/php-src/pull/2978 instanceof now allows literals as the first operand (the result is always false).
98+
null instanceof \stdClass;
99+
94100
// https://wiki.php.net/rfc/trailing-comma-function-calls Trailing commas in function and method calls are now allowed.
95101
foo(
96102
$arg,

0 commit comments

Comments
 (0)