Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- declare(strict_types=1);
- class Foo
- {
- public static function foo($x, $z): string {
- global $k, $s1;
- $obj->foo()->bar();
- $arr = [0 => "zero", 1 => "one"];
- call_func(function () {
- return 0;
- });
- for ($i = 0; $i < $x; $i++) {
- $y += ($y ^ 0x123) << 2;
- }
- $k = $x > 15 ? 1 : 2;
- $k = $x ?: 0;
- $k = $x ?? $z;
- $k = $x <=> $z;
- do {
- try {
- if (!0 > $x && !$x < 10) {
- while ($x != $y) {
- $x = f($x * 3 + 5);
- }
- $z += 2;
- } else if ($x > 20) {
- $z = $x << 1;
- } else {
- $z = $x | 2;
- }
- $j = (int)$z;
- switch ($j) {
- case 0:
- $s1 = 'zero';
- break;
- case 2:
- $s1 = 'two';
- break;
- default:
- $s1 = 'other';
- }
- } catch (exception $e) {
- $t = $one[0];
- $u = $one['str'];
- $v = $one[$x[1]];
- echo $val{foo . $num}[$cell{$a}];
- } finally {
- // do something
- }
- } while ($x < 0);
- return $x;
- }
- public function __toString() {
- return 'aaa';
- }
- }
- function bar(): Foo {
- return new Foo(1, 2);
- }
- ?>
- <div><?= Foo::foo(1, 2) ?></div>
Add Comment
Please, Sign In to add comment