com php-src: Recreated test.php: test.php

From: Date: Fri, 20 Dec 2013 12:56:21 +0000
Subject: com php-src: Recreated test.php: test.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74539@lists.php.net to get a copy of this message
Commit: 937cc7c80a58121fc43dde881a4fe5f066284cab Author: Bob Weinand <bobwei9@hotmail.com> Fri, 20 Dec 2013 13:56:21 +0100 Parents: d5c685adba8d93509d9f254f1d6bfeb206851cb5 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=937cc7c80a58121fc43dde881a4fe5f066284cab Log: Recreated test.php Changed paths: A test.php Diff: diff --git a/test.php b/test.php new file mode 100644 index 0000000..5fdbcbe --- /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; +}

« previous php.cvs (#74539) next »