Skip to content

Commit ef3e011

Browse files
committed
Merge branch 'master' of https://github.com/krakjoe/phpdbg
2 parents 37eac64 + f06ac6a commit ef3e011

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

phpdbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
#define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */
149149
#define PHPDBG_URL "http://phpdbg.com"
150150
#define PHPDBG_ISSUES "http://github.com/krakjoe/phpdbg/issues"
151-
#define PHPDBG_VERSION "0.3.0-dev"
151+
#define PHPDBG_VERSION "0.3.0"
152152
#define PHPDBG_INIT_FILENAME ".phpdbginit"
153153
/* }}} */
154154

test.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
}

0 commit comments

Comments
 (0)