summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2013-12-20 13:20:40 +0000
committerkrakjoe <joe.watkins@live.co.uk>2013-12-20 13:20:40 +0000
commitef3e0119b8437c855049ee3a67b0317dce055669 (patch)
tree18de3cb54ddae8348567eeac630b22a44f36b8d5
parent37eac64e36e2200c90656398895397dbb8c14994 (diff)
parentf06ac6a531c10bbb20d2bf148be57a29bb804de4 (diff)
downloadphp-git-ef3e0119b8437c855049ee3a67b0317dce055669.tar.gz
Merge branch 'master' of https://github.com/krakjoe/phpdbg
-rw-r--r--phpdbg.h2
-rw-r--r--test.php51
2 files changed, 52 insertions, 1 deletions
diff --git a/phpdbg.h b/phpdbg.h
index 7d2b5b5e0c..f0a59ce473 100644
--- a/phpdbg.h
+++ b/phpdbg.h
@@ -148,7 +148,7 @@
#define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */
#define PHPDBG_URL "http://phpdbg.com"
#define PHPDBG_ISSUES "http://github.com/krakjoe/phpdbg/issues"
-#define PHPDBG_VERSION "0.3.0-dev"
+#define PHPDBG_VERSION "0.3.0"
#define PHPDBG_INIT_FILENAME ".phpdbginit"
/* }}} */
diff --git a/test.php b/test.php
new file mode 100644
index 0000000000..5fdbcbe1a4
--- /dev/null
+++ b/test.php
@@ -0,0 +1,51 @@
+<?php
+if (isset($include)) {
+ include (sprintf("%s/web-bootstrap.php", dirname(__FILE__)));
+}
+
+$stdout = fopen("php://stdout", "w+");
+
+class phpdbg {
+ public function isGreat($greeting = null) {
+ printf(
+ "%s: %s\n", __METHOD__, $greeting);
+ return $this;
+ }
+}
+
+function test($x, $y = 0) {
+ $var = $x + 1;
+ $var += 2;
+ $var <<= 3;
+
+ $foo = function () {
+ echo "bar!\n";
+ };
+
+ $foo();
+
+ yield $var;
+}
+
+$dbg = new phpdbg();
+
+var_dump(
+ $dbg->isGreat("PHP Rocks!!"));
+
+foreach (test(1,2) as $gen)
+ continue;
+
+echo "it works!\n";
+
+if (isset($dump))
+ var_dump($_SERVER);
+
+function phpdbg_test_ob()
+{
+ echo 'Start';
+ ob_start();
+ echo 'Hello';
+ $b = ob_get_clean();
+ echo 'End';
+ echo $b;
+}