Arquivos
hhvm/hphp/test/quick/hh_functions.php
T
Alok Menghrajani db9577b140 Rename strict with Hack
Strict mode was the old name. Let's avoid any confusion in the future and rename things.
2013-05-15 13:05:03 -07:00

15 linhas
302 B
PHP

<?hh
function compose<X,Y,Z>((function(Y):Z) $f, (function(X):Y) $g):(function(X):Z) {
return function(X $x):Z use($f, $g) {
return $f($g($x));
};
}
$x = compose('htmlspecialchars_decode', 'htmlspecialchars');
for($i=0;$i<256;$i++) {
if (chr($i) !== $x(chr($i))) {
echo "[$i]\n";
}
}