Handle this typehints
[hiphop-php.git] / hphp / test / quick / hh_functions.php
blob32cf3c435f706b9fc2b3bcfca8420494f195829e
1 <?hh
2 function compose<X,Y,Z>((function(Y):Z) $f, (function(X):Y) $g):(function(X):Z) {
3 return function(X $x):Z use($f, $g) {
4 return $f($g($x));
5 };
8 $x = compose('htmlspecialchars_decode', 'htmlspecialchars');
10 for($i=0;$i<256;$i++) {
11 if (chr($i) !== $x(chr($i))) {
12 echo "[$i]\n";