- Output for git.master, git.master_jit, rfc.property-hooks
- <?hh $zero = $f ==> $x ==> $x;$one = $f ==> $x ==> $f($x); $two = $f ==> $x ==> $f($f($x)); $three = $f ==> $x ==> $f($f($f($x))); $five = $f ==> $x ==> $f($f($f($f($f($x))))); $true = $x ==> $y ==> $x; $false = $x ==> $y ==> $y; $if = $f ==> $f; $isZero = $f ==> ($f($x ==> $false))($true); /*$increment = $n ==> $f ==> $x ==> { $a = $n($f); return $f($a($x)); }; $decrement = $n ==> $f ==> $x ==> { $a = $n($g ==> $h ==> $h($g($f))); $b = $a($y ==> $x); return $b($y ==> $y); }; $add = $m ==> $n ==> { $a = $n($increment); return $a($m); }; $subtract = $m ==> $n ==> { $a = $n($decrement); return $a($m); }; $multiply = $m ==> $n ==> { $a = $n($add($m)); return $a($zero); }; $power = $m ==> $n ==> { $a = $n($multiply($m)); return $a($one); }; $pair = $x ==> $y ==> $f ==> { $a = $f($x); return $a($y); }; $car = $p ==> $p($x ==> $y ==> $x); $cdr = $p ==> $p($x ==> $y ==> $y); $a = $multiply($five); $a = $a($two); $b = $increment($a); $c = $increment($b); $d = $increment($c); $e = $increment($d); $f = $increment($e); $g = $increment($f); $h = $increment($g); $i = $increment($h); $j = $increment($i); $k = $increment($j); $l = $increment($k); $m = $increment($l); $n = $increment($m); $o = $increment($n); $p = $increment($o); $q = $increment($p); $r = $increment($q); $s = $increment($r); $t = $increment($s); $u = $increment($t); $v = $increment($u); $w = $increment($v); $x = $increment($w); $y = $increment($x); $z = $increment($y); $A = $increment($z); $B = $increment($A); $C = $increment($B); $D = $increment($C); $E = $increment($D); $F = $increment($E); $G = $increment($F); $H = $increment($G); $I = $increment($H); $J = $increment($I); $K = $increment($J); $L = $increment($K); $M = $increment($L); $N = $increment($M); $O = $increment($N); $P = $increment($O); $Q = $increment($P); $R = $increment($Q); $S = $increment($R); $T = $increment($S); $U = $increment($T); $V = $increment($U); $W = $increment($V); $X = $increment($W); $Y = $increment($X); $Z = $increment($Y); $dot = $increment($Z); $comma = $increment($dot); $exclamationMark = $increment($comma); $questionMark = $increment($exclamationMark); $colon = $increment($questionMark);*/ $toNum = function ($f) { $a = $f(function ($x) { return $x + 1; }); return $a(0); }; $toBool = function ($f) use ($if) { $a = $if($f); $b = $a(true); return $b(false); }; $toTextBool = function ($f) use ($toBool) { return $toBool($f) ? 'true' : 'false'; }; echo $toTextBool($isZero($zero));
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches
Archived branches
Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
- 2020-03-21 RFC: Is_Literal - declined
- 2020-12-04 Enumerations - included in PHP 8.1
- 2018-06-15 Typed Properties v2 - implemented in PHP 7.4
- 2016-08-12 Object typehint - included in PHP 7.2
- 2016-08-14 Arrow functions - withdrawn
- 2016-05-29 array_change_keys() - withdrawn
- 2016-04-19 Lexical scope support for anonymous classes - suspended
- 2016-04-17 Functional Interfaces - declined
- 2016-03-16 Typed Properties - superseded in favor of Typed Properties 2.0
- 2015-08-27 Callable Prototypes - declined
- 2015-05-01 Short Closures - declined / withdrawn in favor of Arrow Functions
- 2015-02-18 Scalar type hints v5 - included in PHP 7
- 2015-02-14 Union Types - declined
- 2013-09-22 Anonymous classes - included in PHP 7