3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($players1, $confirm1, $players2, $confirm2){ if ($players1 === NULL and $confirm1 === 0) { return 1; } elseif ($players1 !== NULL and $confirm1 === 1 and $players2 === NULL and $confirm2 === 0) { return 2; } else { return 3; } } $tests = [ [null, 0, null, null], [1,1, null, 0], [1, null, null, null], [1,1,1,1], ]; foreach($tests as $test){ var_dump(check(...$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)
8.3.60.0090.00918.23
8.3.50.0170.00316.30
8.3.40.0110.00418.42
8.3.30.0160.00018.57
8.3.20.0000.00720.59
8.3.10.0080.00021.97
8.3.00.0040.00421.77
8.2.180.0160.00318.16
8.2.170.0040.01122.96
8.2.160.0140.00021.95
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0060.00326.16
8.2.120.0080.00019.35
8.2.110.0100.00021.12
8.2.100.0060.00617.72
8.2.90.0050.00517.75
8.2.80.0000.00918.91
8.2.70.0030.00517.93
8.2.60.0080.00018.09
8.2.50.0040.00419.25
8.2.40.0060.00321.01
8.2.30.0070.00019.30
8.2.20.0040.00418.13
8.2.10.0040.00419.22
8.2.00.0000.00719.31
8.1.280.0070.00725.92
8.1.270.0030.00620.39
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00319.16
8.1.230.0040.00820.96
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0040.00417.47
8.1.190.0040.00417.23
8.1.180.0070.00018.97
8.1.170.0080.00018.51
8.1.160.0000.00718.95
8.1.150.0030.00519.07
8.1.140.0000.00720.66
8.1.130.0040.00420.27
8.1.120.0070.00017.45
8.1.110.0080.00017.47
8.1.100.0070.00017.52
8.1.90.0040.00417.50
8.1.80.0090.00017.34
8.1.70.0040.00417.42
8.1.60.0040.00417.58
8.1.50.0040.00417.54
8.1.40.0000.00917.41
8.1.30.0050.00317.64
8.1.20.0050.00317.69
8.1.10.0040.00417.49
8.1.00.0070.00017.46
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0040.00418.44
8.0.270.0030.00316.69
8.0.260.0000.00620.07
8.0.250.0040.00416.86
8.0.240.0060.00316.98
8.0.230.0000.00716.95
8.0.220.0030.00316.80
8.0.210.0030.00316.83
8.0.200.0030.00316.83
8.0.190.0000.00816.78
8.0.180.0000.00816.82
8.0.170.0070.00416.90
8.0.160.0040.00416.88
8.0.150.0000.00816.71
8.0.140.0060.00316.80
8.0.130.0000.00613.39
8.0.120.0040.00416.91
8.0.110.0000.00716.85
8.0.100.0040.00416.92
8.0.90.0030.00616.79
8.0.80.0040.01116.87
8.0.70.0050.00316.90
8.0.60.0040.00417.00
8.0.50.0080.00016.95
8.0.30.0130.00317.09
8.0.20.0120.00617.07
8.0.10.0040.00416.89
8.0.00.0110.00616.84
7.4.330.0050.00016.77
7.4.320.0030.00316.56
7.4.300.0060.00016.60
7.4.290.0000.00716.50
7.4.280.0000.00816.49
7.4.270.0000.00716.52
7.4.260.0070.00013.23
7.4.250.0040.00416.57
7.4.240.0000.00716.61
7.4.230.0030.00316.70
7.4.220.0020.00516.50
7.4.210.0050.01016.63
7.4.200.0000.00716.63
7.4.130.0110.01116.34
7.4.120.0070.01016.52
7.4.110.0130.00316.64
7.4.100.0070.01016.48
7.4.90.0040.01316.50
7.4.80.0100.00719.39
7.4.70.0120.00616.63
7.4.60.0090.01316.64
7.4.50.0030.01216.29
7.4.40.0150.00316.63
7.4.10.0110.01116.35
7.4.00.0130.00316.48
7.3.330.0070.00016.16
7.3.320.0060.00013.34
7.3.310.0000.00616.22
7.3.300.0070.00016.38
7.3.290.0100.00716.32
7.3.260.0180.00416.56
7.3.240.0090.00716.55
7.3.230.0110.00616.38
7.3.210.0110.02416.66
7.3.200.0070.01016.48
7.3.190.0060.01216.63
7.3.180.0160.00016.35
7.3.170.0130.00416.65
7.3.160.0030.01316.68
7.3.130.0070.01016.41
7.3.120.0120.00616.47
7.3.110.0030.01316.55
7.3.100.0090.00616.29
7.3.90.0080.00816.31
7.3.80.0170.00416.62
7.3.70.0100.01016.52
7.3.60.0040.01116.28
7.3.50.0070.01116.28
7.3.40.0080.00816.51
7.3.30.0090.00816.30
7.3.20.0060.01316.32
7.3.10.0110.00416.39
7.3.00.0070.01016.40
7.2.330.0030.01416.74
7.2.320.0160.00316.70
7.2.310.0000.01616.53
7.2.300.0060.01216.42
7.2.290.0160.00016.81
7.2.260.0060.01116.79
7.2.250.0120.00316.75
7.2.240.0090.00916.36
7.2.230.0030.01416.80
7.2.220.0130.00316.64
7.2.210.0100.01016.67
7.2.200.0100.01016.51
7.2.190.0150.00616.60
7.2.180.0110.00616.57
7.2.170.0140.00316.63
7.2.160.0130.00916.56
7.2.150.0090.00916.70
7.2.140.0110.00416.52
7.2.130.0030.01216.76
7.2.120.0060.01016.68
7.2.110.0040.01316.64
7.2.100.0140.00716.60
7.2.90.0030.01616.57
7.2.80.0190.01116.59
7.2.70.0060.01216.51
7.2.60.0130.00616.70
7.2.50.0100.00716.50
7.2.40.0120.00416.65
7.2.30.0100.01016.59
7.2.20.0080.00816.63
7.2.10.0090.00916.57
7.2.00.0100.00616.56

preferences:
57.86 ms | 400 KiB | 5 Q