php-src/Zend/tests/const_expr_dim_on_null_warning.phpt

11 lines
195 B
PHP

--TEST--
DIM on null in constant expr should emit warning
--FILE--
<?php
const C = (null)['foo'];
var_dump(C);
?>
--EXPECTF--
Warning: Trying to access array offset on null in %s on line %d
NULL