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