3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private $y = null; public function __construct($y=null) { $this->y = (int)$y; } } function evilSearch($obj, $p=-2147483648, $q=2147483647, $max = 32, $c = 0) { if($c>$max) { return null; } $class = get_class($obj); $r = (int)(($p+$q)/2); $z = new $class($r); if($z>$obj) { return evilSearch($obj, $p, $r, $max, $c+1); } if($z<$obj) { return evilSearch($obj, $r, $q, $max, $c+1); } return $r; } echo('<pre>'); $test = new X(mt_rand()); var_dump(evilSearch($test), $test);

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)
7.4.00.0040.01215.02
7.3.120.0100.00314.84
7.3.110.0040.01214.90
7.3.100.0060.00914.95
7.3.90.0080.00615.05
7.3.80.0030.01314.84
7.3.70.0060.00914.71
7.3.60.0040.00414.95
7.3.50.0030.01414.85
7.3.40.0000.01014.93
7.3.30.0060.00914.64
7.3.20.0060.01016.58
7.3.10.0060.00616.62
7.3.00.0040.01116.80
7.2.250.0000.01914.95
7.2.240.0090.01215.18
7.2.230.0030.01015.03
7.2.220.0060.00614.84
7.2.210.0030.01015.16
7.2.200.0040.01415.17
7.2.190.0060.01214.99
7.2.180.0100.00715.12
7.2.170.0040.00714.96
7.2.00.0070.00719.23
7.1.330.0120.00315.89
7.1.320.0060.00915.48
7.1.310.0090.00615.61
7.1.300.0000.01015.81
7.1.290.0000.01315.96
7.1.280.0090.00615.69
7.1.270.0090.00615.98
7.1.260.0040.01215.67
7.1.70.0060.00317.19
7.1.60.0140.01119.82
7.1.50.0070.01716.99
7.1.00.0030.07722.42
7.0.200.0000.01016.70
7.0.140.0000.07322.00
7.0.70.4470.03019.92
7.0.60.0130.08020.02
7.0.50.0070.06717.98
7.0.40.0100.08020.12
7.0.30.0300.07320.17
7.0.20.0300.06020.30
7.0.10.0300.09320.12
7.0.00.0070.04020.23
5.6.280.0030.07021.00
5.6.210.0100.07720.72
5.6.200.0070.06718.15
5.6.190.0070.08720.47
5.6.180.0330.07020.56
5.6.170.0270.08020.48
5.6.160.0100.08720.46
5.6.150.0100.07718.14
5.6.140.0100.04018.28
5.6.130.0100.06718.21
5.6.120.0170.07321.02
5.6.110.0100.08021.14
5.6.100.0030.07321.08
5.6.90.0170.07321.04
5.6.80.0100.04320.39
5.6.70.0230.05720.45
5.5.350.0100.06020.50
5.5.340.0170.06717.93
5.5.330.0000.08320.19
5.5.320.0100.08020.14
5.5.310.0270.07020.20
5.5.300.0130.08017.97
5.5.290.0030.07717.99
5.5.280.0030.06020.97
5.5.270.0130.09020.97
5.5.260.0000.08720.88
5.5.250.0070.03720.51
5.5.240.0100.07720.05
5.4.450.0800.07719.48
5.4.440.0570.06719.38
5.4.430.0830.06719.67
5.4.420.0500.04319.54
5.4.410.0870.05019.30
5.4.400.0770.04319.06
5.4.390.0730.06319.13
5.4.380.0270.04718.59
5.4.370.0100.05018.77
5.4.360.0130.03318.76
5.4.350.0050.03812.05
5.4.340.0050.03512.04
5.4.320.0030.03912.54
5.4.310.0060.03812.53
5.4.300.0080.04312.53
5.4.290.0080.03712.54
5.4.280.0100.03712.43
5.4.270.0030.03912.43
5.4.260.0170.05018.86
5.4.250.0170.04718.84
5.4.240.0030.05718.77
5.4.230.0070.05018.99
5.4.220.0070.05319.07
5.4.210.0230.03718.75
5.4.200.0100.06018.98
5.4.190.0130.04718.88
5.4.180.0000.05718.89
5.4.170.0130.04718.86
5.4.160.0100.05718.68
5.4.150.0130.04718.71
5.4.140.0070.05016.45
5.4.130.0130.04316.47
5.4.120.0070.05016.60
5.4.110.0070.05016.34
5.4.100.0200.04016.37
5.4.90.0100.04716.39
5.4.80.0030.05016.27
5.4.70.0070.07016.42
5.4.60.0000.05316.50
5.4.50.0100.04316.31
5.4.40.0070.04716.37
5.4.30.0000.05316.62
5.4.20.0030.05316.27
5.4.10.0030.05016.40
5.4.00.0070.04715.91
5.3.290.0060.04012.80
5.3.280.0070.05714.69
5.3.270.0170.04714.70
5.3.260.0070.08014.70
5.3.250.0030.05714.84
5.3.240.0130.04314.62
5.3.230.0070.05714.75
5.3.220.0100.04714.65
5.3.210.0030.05314.76
5.3.200.0070.05014.57
5.3.190.0030.05314.67
5.3.180.0070.04714.55
5.3.170.0030.05714.76
5.3.160.0100.04714.71
5.3.150.0170.04014.41
5.3.140.0030.05014.59
5.3.130.0030.05714.73
5.3.120.0130.04714.57
5.3.110.0100.05014.57
5.3.100.0130.04713.95
5.3.90.0100.04714.10
5.3.80.0070.05014.00
5.3.70.0070.05314.11
5.3.60.0030.05314.02
5.3.50.0030.05313.95
5.3.40.0170.06714.10
5.3.30.0100.04314.09
5.3.20.0000.05713.61
5.3.10.0100.06713.73
5.3.00.0030.05313.56
5.2.170.0000.05711.29
5.2.160.0000.04311.30
5.2.150.0130.05311.28
5.2.140.0000.04311.29
5.2.130.0070.03711.13
5.2.120.0070.03711.23
5.2.110.0100.03311.00
5.2.100.0100.03311.34
5.2.90.0070.04011.23
5.2.80.0070.04310.99
5.2.70.0130.03311.25
5.2.60.0030.04311.08
5.2.50.0070.04011.17
5.2.40.0030.04011.24
5.2.30.0030.04011.00
5.2.20.0000.04711.10
5.2.10.0070.03710.90
5.2.00.0070.05710.82
5.1.60.0030.03310.07
5.1.50.0070.04310.07
5.1.40.0030.03310.30
5.1.30.0130.02710.49
5.1.20.0030.03710.52
5.1.10.0030.03710.18
5.1.00.0000.04010.21
5.0.50.0070.0278.76
5.0.40.0070.0378.52
5.0.30.0000.0438.42
5.0.20.0030.0378.40
5.0.10.0070.0238.38
5.0.00.0030.0408.36
4.4.90.0070.0176.34
4.4.80.0030.0206.34
4.4.70.0000.0236.34
4.4.60.0030.0206.34
4.4.50.0000.0336.34
4.4.40.0000.0376.34
4.4.30.0030.0206.34
4.4.20.0000.0236.34
4.4.10.0070.0176.34
4.4.00.0000.0336.34
4.3.110.0000.0306.34
4.3.100.0000.0336.34
4.3.90.0000.0206.34
4.3.80.0000.0376.34
4.3.70.0000.0206.34
4.3.60.0030.0176.34
4.3.50.0030.0206.34
4.3.40.0100.0306.34
4.3.30.0000.0306.34
4.3.20.0070.0176.34
4.3.10.0000.0276.34
4.3.00.0070.0277.80

preferences:
42.83 ms | 400 KiB | 5 Q