summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/tests/info_001.phpt
blob: 28078557095d619540a6abfecc7ae9153f550163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--TEST--
Test basic info functionality
--INI--
auto_globals_jit=0
--PHPDBG--
i classes
i funcs
b foo
r
i v
i g
i b
i d
i F
i e
i l
c
i v
q
--EXPECTF--
[Successful compilation of %s]
prompt> [User Classes (1)]
User Class Foo\Bar (2)
|---- in %s on line 4
prompt> [User Functions (1)]
|-------- foo in %s on line 14
prompt> [Breakpoint #0 added at foo]
prompt> string(4) "test"
[Breakpoint #0 in foo() at %s:15, hits: 1]
>00015: 		var_dump(strrev($baz));
 00016: 	}
 00017: 
prompt> [Variables in foo() (1)]
Address            Refs    Type      Variable
%s %d       string    $baz
string (4) "test"
prompt> [Superglobal variables (8)]
Address            Refs    Type      Variable
%s 2       array     $_GET
%s 2       array     $_POST
%s 2       array     $_COOKIE
%s 2       array     $_SERVER
%s 2       array     $_ENV
%s 1       array     $_REQUEST
%s 2       array     $_FILES
%s 1       array     &$GLOBALS
prompt> ------------------------------------------------
Function Breakpoints:
#0		foo
prompt> [User-defined constants (0)]
prompt> [Included files: %d]%A
prompt> [No error found!]
prompt> [Literal Constants in foo() (2)]
|-------- C0 -------> [var_dump]
|-------- C1 -------> [strrev]
prompt> string(4) "tset"
[Script ended normally]
prompt> [No active op array!]
prompt> 
--FILE--
<?php

namespace Foo {
	class Bar {
		function Foo($bar) {
			var_dump($bar);
		}

		function baz() { }
	}
}

namespace {
	function foo($baz) {
		var_dump(strrev($baz));
	}

	(new \Foo\Bar)->Foo("test");
	foo("test");
}