Arquivos
hhvm/hphp/test/vm/function-static-init.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

33 linhas
316 B
PHP

<?php
function f() {
static $x = 40;
var_dump($x);
$x++;
}
f();
f();
f();
function blerg() {
static $a = array(ICHI, NI, SAN);
var_dump($a);
$a []= count($a) + 1;
}
define("ICHI", 1);
define("NI", 2);
define("SAN", 3);
blerg();
blerg();
blerg();
function n() {
static $x;
var_dump($x);
}
n();