mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
c5cf0af8a9
Apparently, breakpoints and watchpoints are practically disabled if run with OPcache JIT under Windows, so we mark the affected tests as xfail in that case for the time being.
50 lines
903 B
PHP
50 lines
903 B
PHP
--TEST--
|
|
test finish and leave commands
|
|
--SKIPIF--
|
|
<?php
|
|
if (PHP_OS_FAMILY === 'Windows' && ini_get('opcache.jit') && ini_get('opcache.jit_buffer_size')) {
|
|
die('xfail breakpoint/watchpoint issues with JIT on Windows');
|
|
}
|
|
?>
|
|
--INI--
|
|
opcache.optimization_level=0
|
|
--PHPDBG--
|
|
b bar
|
|
b 5
|
|
r
|
|
finish
|
|
leave
|
|
leave
|
|
q
|
|
--EXPECTF--
|
|
[Successful compilation of %s]
|
|
prompt> [Breakpoint #0 added at bar]
|
|
prompt> [Breakpoint #1 added at %s:5]
|
|
prompt> [Breakpoint #0 in bar() at %s:9, hits: 1]
|
|
>00009: return "world";
|
|
00010: }
|
|
00011:
|
|
prompt> [Breakpoint #1 at %s:5, hits: 1]
|
|
>00005: return ["hello", $other];
|
|
00006: }
|
|
00007:
|
|
prompt> [Breaking for leave at %s:5]
|
|
>00005: return ["hello", $other];
|
|
00006: }
|
|
00007:
|
|
prompt> [Already at the end of the function]
|
|
prompt>
|
|
--FILE--
|
|
<?php
|
|
function foo() {
|
|
$other = bar();
|
|
|
|
return ["hello", $other];
|
|
}
|
|
|
|
function bar() {
|
|
return "world";
|
|
}
|
|
|
|
foo();
|