php-src/Zend/tests/first_class_callable_assert2.phpt
Nikita Popov b6dcab2cbb Fix assert with attribute + first-class callable in assert
This is going to result in a compile-time error, but AST printing
is invoked first and should handle it gracefully. Handle it by
falling back to more generic printing code.

Fixes oss-fuzz #36264.
2021-07-19 12:08:03 +02:00

12 lines
203 B
PHP

--TEST--
Foo(...) in attribute in assert
--FILE--
<?php
assert(function() {
#[Foo(...)]
class Test {}
});
?>
--EXPECTF--
Fatal error: Cannot create Closure as attribute argument in %s on line %d