mirror of
https://github.com/php/php-src.git
synced 2026-04-13 02:52:48 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: Disable opcache optimizations during some observer tests
This commit is contained in:
@@ -6,6 +6,7 @@ Observer: Retvals are observable that are: IS_CONST
|
||||
zend_test.observer.enabled=1
|
||||
zend_test.observer.observe_all=1
|
||||
zend_test.observer.show_return_value=1
|
||||
opcache.optimization_level=0
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
|
||||
@@ -6,6 +6,7 @@ Observer: Retvals by reference are observable that are: IS_VAR, ZEND_RETURNS_FUN
|
||||
zend_test.observer.enabled=1
|
||||
zend_test.observer.observe_all=1
|
||||
zend_test.observer.show_return_value=1
|
||||
opcache.optimization_level=0
|
||||
--FILE--
|
||||
<?php
|
||||
function getMessage() {
|
||||
|
||||
@@ -12,31 +12,31 @@ register_shutdown_function(function () {
|
||||
echo 'Shutdown: ' . foo() . PHP_EOL;
|
||||
});
|
||||
|
||||
function bar() {
|
||||
return 42;
|
||||
function bar($arg) {
|
||||
return $arg;
|
||||
}
|
||||
|
||||
function foo() {
|
||||
bar();
|
||||
return bar();
|
||||
bar(41);
|
||||
return bar(42);
|
||||
}
|
||||
|
||||
echo 'Done: ' . bar() . PHP_EOL;
|
||||
echo 'Done: ' . bar(40) . PHP_EOL;
|
||||
?>
|
||||
--EXPECTF--
|
||||
<!-- init '%s/observer_shutdown_%d.php' -->
|
||||
<file '%s/observer_shutdown_%d.php'>
|
||||
<!-- init bar() -->
|
||||
<bar>
|
||||
</bar:42>
|
||||
Done: 42
|
||||
</bar:40>
|
||||
Done: 40
|
||||
</file '%s/observer_shutdown_%d.php'>
|
||||
<!-- init {closure}() -->
|
||||
<{closure}>
|
||||
<!-- init foo() -->
|
||||
<foo>
|
||||
<bar>
|
||||
</bar:42>
|
||||
</bar:41>
|
||||
<bar>
|
||||
</bar:42>
|
||||
</foo:42>
|
||||
|
||||
@@ -16,33 +16,33 @@ class MyClass
|
||||
}
|
||||
}
|
||||
|
||||
function bar() {
|
||||
return 42;
|
||||
function bar($arg) {
|
||||
return $arg;
|
||||
}
|
||||
|
||||
function foo() {
|
||||
bar();
|
||||
return bar();
|
||||
bar(41);
|
||||
return bar(42);
|
||||
}
|
||||
|
||||
$mc = new MyClass();
|
||||
|
||||
echo 'Done: ' . bar() . PHP_EOL;
|
||||
echo 'Done: ' . bar(40) . PHP_EOL;
|
||||
?>
|
||||
--EXPECTF--
|
||||
<!-- init '%s/observer_shutdown_%d.php' -->
|
||||
<file '%s/observer_shutdown_%d.php'>
|
||||
<!-- init bar() -->
|
||||
<bar>
|
||||
</bar:42>
|
||||
Done: 42
|
||||
</bar:40>
|
||||
Done: 40
|
||||
</file '%s/observer_shutdown_%d.php'>
|
||||
<!-- init MyClass::__destruct() -->
|
||||
<MyClass::__destruct>
|
||||
<!-- init foo() -->
|
||||
<foo>
|
||||
<bar>
|
||||
</bar:42>
|
||||
</bar:41>
|
||||
<bar>
|
||||
</bar:42>
|
||||
</foo:42>
|
||||
|
||||
Reference in New Issue
Block a user