-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-16665: \array and \callable should not be usable
This list was initially introduced in 53a4038, but never included array or callable. I suppose this is because int & friends are not actual tokens, while array and callable are. This means it was never possible to do class array, which is probably the reason this was overlooked. Closes GH-16683.
- Loading branch information
Showing
5 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--TEST-- | ||
GH-16665 (\array should not be usable) | ||
--FILE-- | ||
<?php | ||
class_alias('stdClass', 'array'); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Cannot use "array" as a class alias as it is reserved in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--TEST-- | ||
GH-16665 (\callable should not be usable) | ||
--FILE-- | ||
<?php | ||
class_alias('stdClass', 'callable'); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Cannot use "callable" as a class alias as it is reserved in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters