1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/Zend/tests/bug47572.phpt
Nikita Popov aad39879f2 Remove bareword fallback for constants
Access to undefined constants will now always result in an Error
exception being thrown.

This required quite a few test changes, because there were many
buggy tests that unintentionally used bareword fallback in combination
with error suppression.
2019-01-31 13:52:06 +01:00

21 lines
298 B
PHP

--TEST--
Bug #47572 (zval_update_constant_ex: Segmentation fault)
--FILE--
<?php
class Foo {
public static $bar = array(
FOO => "bar"
);
}
$foo = new Foo();
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant 'FOO' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d