xref: /PHP-7.2/sapi/phpdbg/tests/clean_001.phpt (revision b8534daa)
1--TEST--
2Cleaning must preserve breakpoints
3--INI--
4opcache.enable_cli=0
5--PHPDBG--
6b 4
7b foo
8r
9c
10clean
11y
12c
13r
14c
15
16q
17--EXPECTF--
18[Successful compilation of %s]
19prompt> [Breakpoint #0 added at %s:4]
20prompt> [Breakpoint #1 added at foo]
21prompt> 1
22[Breakpoint #0 at %s:4, hits: 1]
23>00004: echo 2;
24 00005: echo 3;
25 00006: foo();
26prompt> 23
27[Breakpoint #1 in foo() at %s:9, hits: 1]
28>00009: 	echo 4;
29 00010: }
30 00011:
31prompt> Do you really want to clean your current environment? (type y or n): Cleaning Execution Environment
32Classes    %d
33Functions  %d
34Constants  %d
35Includes   0
36prompt> [Not running]
37prompt> 1
38[Breakpoint #0 at %s:4, hits: 1]
39>00004: echo 2;
40 00005: echo 3;
41 00006: foo();
42prompt> 23
43[Breakpoint #1 in foo() at %s:9, hits: 1]
44>00009: 	echo 4;
45 00010: }
46 00011:
47prompt> 4
48[Script ended normally]
49prompt>
50--FILE--
51<?php
52
53echo 1;
54echo 2;
55echo 3;
56foo();
57
58function foo() {
59	echo 4;
60}
61