]> granicus.if.org Git - php/commitdiff
Fixed test (Warning -> Exception)
authorDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2019 19:44:30 +0000 (22:44 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2019 19:44:30 +0000 (22:44 +0300)
ext/opcache/tests/optimize_static_001.phpt

index d4e2c5806261567a97d5a142f8dacdf6a1bf62b5..8279ecacf55bbb56f3f3cbadb03cd193bc82a73c 100644 (file)
@@ -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