1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Files
archived-php-src/Zend/tests/prop_const_expr/rhs_object_nullsafe.phpt
T
2022-07-18 23:52:28 +02:00

19 lines
308 B
PHP

--TEST--
Nullsafe property constant expression rhs wrong type
--FILE--
<?php
class A {}
class B {}
const A_prop = (new A)?->{new B};
var_dump(A_prop);
?>
--EXPECTF--
Fatal error: Uncaught Error: Object of class B could not be converted to string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d