1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/gh16665_2.phpt
Niels Dossche 96d1cd00b7 Fix GH-16665: \array and \callable should not be usable
This list was initially introduced in 53a40386, 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.
2024-11-06 18:16:06 +01:00

9 lines
205 B
PHP

--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