1--TEST-- 2test finish and leave commands 3--INI-- 4opcache.optimization_level=0 5--PHPDBG-- 6b bar 7b 5 8r 9finish 10leave 11leave 12q 13--EXPECTF-- 14[Successful compilation of %s] 15prompt> [Breakpoint #0 added at bar] 16prompt> [Breakpoint #1 added at %s:5] 17prompt> [Breakpoint #0 in bar() at %s:9, hits: 1] 18>00009: return "world"; 19 00010: } 20 00011: 21prompt> [Breakpoint #1 at %s:5, hits: 1] 22>00005: return ["hello", $other]; 23 00006: } 24 00007: 25prompt> [Breaking for leave at %s:5] 26>00005: return ["hello", $other]; 27 00006: } 28 00007: 29prompt> [Already at the end of the function] 30prompt> 31--FILE-- 32<?php 33function foo() { 34 $other = bar(); 35 36 return ["hello", $other]; 37} 38 39function bar() { 40 return "world"; 41} 42 43foo(); 44