function main() { $x = bar(); if ($x) { $x->heh(); } }
function genFoo($a) { $a = bar($a); $z = (yield $a + 5); (yield $z + 1); error_log('Finished in genFoo'); }
function foo() { global $a; $f =& $a; bar(); echo $f; }
function foo() { for ($idx = 0; $idx < 5; $idx++) { bar($idx); echo strlen($idx); } }
function foo() { echo @$undef; error_reporting(E_ALL | E_STRICT); echo $blah; return bar(); }
function foo() { /* * @var $bar Bar */ $bar = bar(); }
function foo() { $td1 = new ThrowDestruct1(); printf("Calling bar()\n"); bar(); printf("After bar()\n"); }
public function SampleFunction($a, $b = NULL) { if ($a === $b) { bar(); } elseif ($a > $b) { $foo->bar($arg1); } else { BazClass::bar($arg2, $arg3); } if (!$b) { echo $c; } if (!strtok($b)) { echo $d; } if (!isset($b)) { echo $d; } if (!($var === $b)) { echo $c; } $variable_name = 'foo'; $_fn = function () { }; }
function foo($seconds) { if ($seconds > 0) { sleep(rand($seconds - 1, $seconds + 1)); bar($seconds - 1); } }
function foo() { for ($idx = 0; $idx < 5; $idx++) { bar($idx); $x = strlen("abc"); } }
function foo() { $x = bar(); $x[0][1] = 'heh'; $y = $x[0][1]; var_dump(is_string($y)); }
function foo() { global $a; bar(); $a = 'harmless'; bar(); }
function histo($r) { $n = count($r); for ($i = 0; $i < $n; $i++) { $ret .= bar($r[$i]); } return $ret; }
function foo() { $a = $b = bar(); //$b = bar(); //$a = $b; $a[1] = 'y'; var_dump($a != $b); }
function foo() { $x = bar(); $x['other']['foo']['heh'] = 2; $x['other']['whatever'] = 2; $x['yoyo'] = array('stuff' => $x); return $x; }
function main() { var_dump(foo()); var_dump(bar()); fb_rename_function('bar', 'baz'); fb_rename_function('foo', 'bar'); var_dump(bar()); }
function quatz() { let('result')->be(6 * 6); print __METHOD__ . ' -- result: ' . get('result') . PHP_EOL; foo(); bar(); print __METHOD__ . ' -- result: ' . get('result') . PHP_EOL; }
function foo() { $x = bar(); // $x: Arr(InitCell) $x[0][1] = 'heh'; $y = $x[0][1]; var_dump(is_string($y)); }
function main() { global $g; $y = bar(); $l = (int) $g; $y = $y[$l]; $y->heh(); }
function quatz(TestCase $tc) { let('result')->be(6 * 6); $tc->assertEquals(get('result'), '36'); foo($tc); bar($tc); $tc->assertEquals(get('result'), '36'); }
function foo() { apc_store("foo", bar(50)); $x = apc_fetch("foo"); $x[5] = 1; $x = bar(20); var_dump($x); }
function foo($x) { $a = $x; echo $x; unset($a); $a = bar(1); bar($a++); }
function foo() { global $a, $rand; $f = 'two'; if ($rand) { $f =& $a; } bar(); echo $f; }
function foo() { $i = 0; for ($idx = 0; $idx < 5; $idx++) { bar($idx); $i += strlen($idx); } return $i; }
function foo() { $x = asd(); $x[0] = bar(); $x[0] = 'a'; echo $x; echo "\n"; var_dump($x); }
public function sampleFunction($a, $b = null) { if ($a === $b) { bar(); } elseif ($a > $b) { $foo->bar($arg1); } else { BazClass::bar($arg2, $arg3); } }
public function testControlStructures() { if ($x) { foo(); } elseif ($y) { bar(); } else { foobar(); } }
function main() { ob_start(function ($str) { bar(); return $str . '!!!'; }); echo 'garbanzo beans'; ob_end_flush(); echo "DON'T PRINT ME!"; }
/** * Test function * * @param string $z * @param array $bar * * @return string */ function foo($z, array $bar = NULL) { $x = 15; $y = ($x + 15) ** 4.4; bar($z); $ccccc = bar(); bar(1, 2, 3); return 15; //return "aaaa $y $bar"; }
function foo() { $td1 = new ThrowDestruct1(); printf("Calling bar()\n"); bar(); printf("After bar()\n"); // This exit() should prevent the destructor // for $td1 from running, as well as any up-stack destructors. exit; }