Skip to content

Commit 937cc7c

Browse files
committed
Recreated test.php
1 parent d5c685a commit 937cc7c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

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)