diff options
Diffstat (limited to 'ext/opcache/tests/optimize_static_001.phpt')
-rw-r--r-- | ext/opcache/tests/optimize_static_001.phpt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/opcache/tests/optimize_static_001.phpt b/ext/opcache/tests/optimize_static_001.phpt index d4e2c58062..8279ecacf5 100644 --- a/ext/opcache/tests/optimize_static_001.phpt +++ b/ext/opcache/tests/optimize_static_001.phpt @@ -11,9 +11,13 @@ opcache.optimization_level=-1 function foo() { static $a = UNDEFINED_CONST; } -foo(); +try { + foo(); +} catch (Throwable $e) { + echo "Exception: " . $e->getMessage() . "\n"; +} ?> OK ---EXPECTF-- -Warning: Use of undefined constant UNDEFINED_CONST - assumed 'UNDEFINED_CONST' (this will throw an Error in a future version of PHP) in %s on line %d +--EXPECT-- +Exception: Undefined constant 'UNDEFINED_CONST' OK
\ No newline at end of file |