php-parser/example.php

40 lines
541 B
PHP
Raw Normal View History

2017-12-01 16:04:31 +00:00
<?php
2017-12-03 07:17:05 +00:00
namespace z7zmey\Example {
use \Exception;
use z7zmey\Foo\{Bar, function Baz};
abstract class Foo extends Bar implements Buz, Buzz {
use \z7zmey\_Trait;
public const CC = 0;
public function &test(bool $a, string $b = null): ?void {
}
2017-12-01 16:04:31 +00:00
}
2017-12-01 16:40:00 +00:00
}
2017-12-03 07:17:05 +00:00
namespace z7zmey\Example2;
2017-12-01 16:40:00 +00:00
if ($a === true) {
} elseif ($a === false) {
} elseif ($a === null) {
} else {
}
2017-12-03 07:17:05 +00:00
$a = "string
with $var
";
$a = 'string
with out $var';
$a = <<<test
heredoc
$var
test;
2017-12-01 16:40:00 +00:00
?>
<?= $b; $b ?>