File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 148
148
#define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */
149
149
#define PHPDBG_URL "http://phpdbg.com"
150
150
#define PHPDBG_ISSUES "http://github.com/krakjoe/phpdbg/issues"
151
- #define PHPDBG_VERSION "0.3.0-dev "
151
+ #define PHPDBG_VERSION "0.3.0"
152
152
#define PHPDBG_INIT_FILENAME ".phpdbginit"
153
153
/* }}} */
154
154
Original file line number Diff line number Diff line change
1
+ <?php
2
+ if (isset ($ include )) {
3
+ include (sprintf ("%s/web-bootstrap.php " , dirname (__FILE__ )));
4
+ }
5
+
6
+ $ stdout = fopen ("php://stdout " , "w+ " );
7
+
8
+ class phpdbg {
9
+ public function isGreat ($ greeting = null ) {
10
+ printf (
11
+ "%s: %s \n" , __METHOD__ , $ greeting );
12
+ return $ this ;
13
+ }
14
+ }
15
+
16
+ function test ($ x , $ y = 0 ) {
17
+ $ var = $ x + 1 ;
18
+ $ var += 2 ;
19
+ $ var <<= 3 ;
20
+
21
+ $ foo = function () {
22
+ echo "bar! \n" ;
23
+ };
24
+
25
+ $ foo ();
26
+
27
+ yield $ var ;
28
+ }
29
+
30
+ $ dbg = new phpdbg ();
31
+
32
+ var_dump (
33
+ $ dbg ->isGreat ("PHP Rocks!! " ));
34
+
35
+ foreach (test (1 ,2 ) as $ gen )
36
+ continue ;
37
+
38
+ echo "it works! \n" ;
39
+
40
+ if (isset ($ dump ))
41
+ var_dump ($ _SERVER );
42
+
43
+ function phpdbg_test_ob ()
44
+ {
45
+ echo 'Start ' ;
46
+ ob_start ();
47
+ echo 'Hello ' ;
48
+ $ b = ob_get_clean ();
49
+ echo 'End ' ;
50
+ echo $ b ;
51
+ }
You can’t perform that action at this time.
0 commit comments