3v4l.org

run code in 300+ PHP versions simultaneously
<?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 ==> { $a = $f($x ==> $false); return $a($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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0140.00016.50
8.3.50.0080.01122.74
8.3.40.0000.01418.77
8.3.30.0070.01018.92
8.3.20.0040.00420.04
8.3.10.0050.00321.59
8.3.00.0040.00419.38
8.2.180.0110.00316.63
8.2.170.0100.00722.96
8.2.160.0130.00020.08
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0080.00020.97
8.2.110.0040.00420.39
8.2.100.0080.00417.59
8.2.90.0000.00719.06
8.2.80.0030.00617.97
8.2.70.0060.00317.49
8.2.60.0030.00617.90
8.2.50.0060.00318.07
8.2.40.0000.00818.19
8.2.30.0050.00217.78
8.2.20.0040.00417.57
8.2.10.0040.00417.79
8.2.00.0040.00417.47
8.1.280.0030.01025.92
8.1.270.0080.00023.89
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00723.91
8.1.230.0080.00422.04
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00017.23
8.1.190.0040.00417.22
8.1.180.0000.00918.10
8.1.170.0080.00018.48
8.1.160.0000.00721.88
8.1.150.0060.00318.73
8.1.140.0040.00417.19
8.1.130.0000.00717.67
8.1.120.0030.00317.31
8.1.110.0000.00817.32
8.1.100.0070.00017.20
8.1.90.0030.00517.30
8.1.80.0000.00717.17
8.1.70.0030.00317.17
8.1.60.0040.00417.41
8.1.50.0090.00017.45
8.1.40.0000.00917.34
8.1.30.0000.00817.53
8.1.20.0000.00717.58
8.1.10.0030.00617.32
8.1.00.0060.00317.25
8.0.300.0030.00318.77
8.0.290.0070.00016.63
8.0.280.0030.00318.30
8.0.270.0070.00017.23
8.0.260.0030.00318.36
8.0.250.0030.00316.84
8.0.240.0070.00316.78
8.0.230.0030.00316.81
8.0.220.0070.00016.81
8.0.210.0070.00016.66
8.0.200.0040.00416.79
8.0.190.0000.00716.80
8.0.180.0040.00416.68
8.0.170.0000.00716.66
8.0.160.0050.00216.63
8.0.150.0030.00316.71
8.0.140.0100.00016.66
8.0.130.0050.00013.31
8.0.120.0040.00416.62
8.0.110.0040.00416.78
8.0.100.0060.00316.81
8.0.90.0030.00316.64
8.0.80.0120.00316.72
8.0.70.0020.00516.58
8.0.60.0070.00016.57
8.0.50.0040.00416.75
8.0.30.0070.01217.23
8.0.20.0130.00617.40
8.0.10.0030.00316.86
8.0.00.0110.00816.47
7.4.330.0000.00515.08
7.4.320.0030.00316.36
7.4.300.0000.00616.25
7.4.290.0070.00016.35
7.4.280.0030.00616.35
7.4.270.0030.00316.30
7.4.260.0000.00716.36
7.4.250.0040.00416.32
7.4.240.0030.00316.46
7.4.230.0070.00016.43
7.4.220.0030.01916.50
7.4.210.0140.00016.33
7.4.200.0070.00016.39
7.4.160.0100.00516.17
7.4.150.0170.00617.40
7.4.140.0120.00917.86
7.4.130.0090.00916.39
7.4.120.0040.01316.37
7.4.110.0140.00316.66
7.4.100.0090.00816.41
7.4.90.0220.02516.35
7.4.80.0090.01219.39
7.4.70.0120.00416.26
7.4.60.0090.00616.27
7.4.50.0040.00416.27
7.4.40.0050.01016.53
7.4.30.0090.00816.57
7.3.330.0000.00513.14
7.3.320.0030.00313.28
7.3.310.0060.00016.08
7.3.300.0030.00316.08
7.3.290.0150.00316.29
7.3.280.0130.00316.11
7.3.270.0060.01617.40
7.3.260.0100.00716.25
7.3.240.0100.00716.23
7.3.230.0080.00816.39
7.3.210.0100.01016.43
7.3.200.0070.01019.39
7.3.190.0060.01516.35
7.3.180.0070.01316.35
7.3.170.0100.01016.32
7.3.160.0060.01016.20
7.2.330.0000.01616.56
7.2.320.0100.01416.50
7.2.310.0060.01016.58
7.2.300.0120.00316.49
7.2.290.0130.00316.33
5.5.150.1330.07020.05
5.5.140.1270.05320.20
5.5.130.1000.05320.33
5.5.120.1030.05720.33
5.5.110.1100.05720.26
5.5.100.1170.05020.07
5.5.90.0930.05720.13
5.5.80.0970.05720.14
5.5.70.0900.05720.19
5.5.60.0930.06320.14
5.5.50.0900.06020.17
5.5.40.1070.06020.15
5.5.30.0970.07019.99
5.5.20.0970.06020.10
5.5.10.1800.06720.11
5.5.00.1530.06320.10
5.4.310.0970.05318.97
5.4.300.1070.06319.11
5.4.290.1170.04719.24
5.4.280.1100.05318.84
5.4.270.0970.05719.29
5.4.260.1030.04318.87
5.4.250.1070.04719.26
5.4.240.1230.03718.84
5.4.230.1100.05019.26
5.4.220.1030.06019.16
5.4.210.0930.05019.15
5.4.200.1100.06319.23
5.4.190.1000.06019.00
5.4.180.1170.07318.84
5.4.170.1300.07319.00
5.4.160.1100.07318.82
5.4.150.0900.06019.02
5.4.140.1100.05716.52
5.4.130.1100.06016.46
5.4.120.1100.05716.42
5.4.110.1100.07016.53
5.4.100.0900.06016.53
5.4.90.1030.06316.58
5.4.80.0930.05716.38
5.4.70.1000.05016.41
5.4.60.1130.07016.30
5.4.50.1170.07016.48
5.4.40.1130.06316.60
5.4.30.1100.06716.48
5.4.20.1100.05716.50
5.4.10.1400.07316.36
5.4.00.0900.05716.00

preferences:
43.99 ms | 401 KiB | 5 Q