mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
35 lines
390 B
PHP
35 lines
390 B
PHP
<?php
|
|
|
|
class phpdbg {
|
|
public function isGreat($greeting = null) {
|
|
printf(
|
|
"%s: %s\n", __METHOD__, $greeting);
|
|
return $this;
|
|
}
|
|
}
|
|
|
|
function test() {
|
|
$var = 1 + 1;
|
|
$var += 2;
|
|
$var <<= 3;
|
|
|
|
$foo = function () {};
|
|
|
|
$foo();
|
|
|
|
return $var;
|
|
}
|
|
|
|
$dbg = new phpdbg();
|
|
|
|
$test = 1;
|
|
|
|
var_dump(
|
|
$dbg->isGreat("PHP Rocks !!"));
|
|
|
|
test();
|
|
|
|
echo "it works!\n";
|
|
|
|
?>
|