diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2013-12-20 13:56:21 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2013-12-20 13:56:21 +0100 |
commit | 937cc7c80a58121fc43dde881a4fe5f066284cab (patch) | |
tree | 9f255b671b79c27480ed4df58f7c9cb4ea91722b | |
parent | d5c685adba8d93509d9f254f1d6bfeb206851cb5 (diff) | |
download | php-git-937cc7c80a58121fc43dde881a4fe5f066284cab.tar.gz |
Recreated test.php
-rw-r--r-- | test.php | 51 |
1 files changed, 51 insertions, 0 deletions
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; +} |