3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "40", // minage=40, maxage=40 "-40", // minage=null, maxage=40 "40-", // minage=40, maxage=null "40-60", // minage=40, maxage=60 "0", // minage=0, maxage=0 "-0", // minage=null, maxage=0 "0-", // minage=0, maxage=null "0-0" // minage=0, maxage=0 ]; foreach($tests as $str) { $minrange = null; $maxrange = null; $parts = explode('-', $str); switch (count($parts)) { case 1: $minrange = $maxrange = intval($parts[0]); break; case 2: $minrange = $parts[0] == "" ? null : intval($parts[0]); $maxrange = $parts[1] == "" ? null : intval($parts[1]); break; } var_export(compact(['minrange', 'maxrange'])); }

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.5.10.0120.00720.18
8.5.00.0120.00821.38
8.4.150.0010.00014.05
8.4.140.0110.01017.48
8.4.130.0050.00418.53
8.4.120.0110.00524.04
8.4.110.0070.00318.88
8.4.100.0120.00818.71
8.4.90.0040.00422.50
8.4.80.0110.00818.57
8.4.70.0050.00518.86
8.4.60.0070.00518.89
8.4.50.0070.00720.16
8.4.40.0090.00619.52
8.4.30.0000.00920.12
8.4.20.0160.00324.21
8.4.10.0090.00921.92
8.3.280.0100.01018.29
8.3.270.0110.01016.86
8.3.260.0120.00716.79
8.3.250.0070.01018.91
8.3.240.0040.00417.20
8.3.230.0150.00416.50
8.3.220.0100.00718.93
8.3.210.0090.00716.75
8.3.200.0050.00416.39
8.3.190.0110.00717.11
8.3.180.0080.00619.25
8.3.170.0150.00316.64
8.3.160.0050.00217.12
8.3.150.0160.00316.61
8.3.140.0110.00418.91
8.3.130.0040.00418.51
8.3.120.0110.00718.88
8.3.110.0050.00320.94
8.3.100.0040.00424.06
8.3.90.0060.00326.77
8.3.80.0040.00418.30
8.3.70.0080.01116.58
8.3.60.0070.01321.80
8.3.50.0170.00020.34
8.3.40.0070.00720.38
8.3.30.0060.01318.70
8.3.20.0040.00424.18
8.3.10.0030.01024.66
8.3.00.0050.00326.16
8.2.290.0100.00419.98
8.2.280.0030.00518.46
8.2.270.0120.00617.18
8.2.260.0060.00318.42
8.2.250.0060.00316.56
8.2.240.0060.00319.14
8.2.230.0080.00022.58
8.2.220.0090.00037.54
8.2.210.0050.00326.77
8.2.200.0060.00316.63
8.2.190.0120.00316.58
8.2.180.0140.00425.92
8.2.170.0120.00322.96
8.2.160.0140.00422.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00021.12
8.2.110.0040.00420.47
8.2.100.0080.00417.78
8.2.90.0000.00819.23
8.2.80.0040.00418.05
8.2.70.0000.01017.63
8.2.60.0000.00817.80
8.2.50.0000.01118.07
8.2.40.0000.00820.07
8.2.30.0040.00418.00
8.2.20.0050.00220.48
8.2.10.0000.00718.00
8.2.00.0040.00419.16
8.1.330.0120.00821.67
8.1.320.0100.01018.15
8.1.310.0040.01216.19
8.1.300.0040.01520.09
8.1.290.0060.00330.84
8.1.280.0090.00925.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00723.87
8.1.230.0070.00422.13
8.1.220.0050.00317.75
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0000.00818.58
8.1.160.0000.00718.76
8.1.150.0000.00718.53
8.1.140.0060.00317.32
8.1.130.0040.00418.76
8.1.120.0030.00317.50
8.1.110.0030.00517.46
8.1.100.0030.00517.47
8.1.90.0040.00417.47
8.1.80.0110.00517.38
8.1.70.0120.00517.34
8.1.60.0150.00417.41
8.1.50.0100.00817.41
8.1.40.0160.00317.46
8.1.30.0100.00917.50
8.1.20.0160.00317.47
8.1.10.0180.00117.41
8.1.00.0120.00717.41
8.0.300.0070.00318.77
8.0.290.0000.00716.75
8.0.280.0090.00018.44
8.0.270.0040.00417.89
8.0.260.0040.00418.35
8.0.250.0070.00017.00
8.0.240.0030.00616.92
8.0.230.0040.00416.84
8.0.220.0030.00316.85
8.0.210.0040.00616.67
8.0.200.0100.00516.75
8.0.190.0100.00516.80
8.0.180.0140.00116.72
8.0.170.0120.00216.71
8.0.160.0110.00216.74
8.0.150.0070.00616.70
8.0.140.0060.00916.76
8.0.130.0070.00516.76
8.0.120.0030.01016.77
8.0.110.0090.00516.80
8.0.100.0120.00416.71
8.0.90.0080.00716.75
8.0.80.0090.00716.79
8.0.70.0100.00616.74
8.0.60.0140.00216.76
8.0.50.0060.00916.65
8.0.30.0120.00216.72
8.0.20.0140.00216.87
8.0.10.0080.00816.91
7.4.330.0040.00015.55
7.4.320.0070.00316.52
7.4.300.0110.00416.48
7.4.290.0120.00316.44
7.4.280.0100.00316.42
7.4.270.0100.00516.45
7.4.260.0140.00016.37
7.4.250.0110.00616.42
7.4.240.0090.00716.33
7.4.230.0130.00416.46
7.4.220.0110.00516.43
7.4.210.0110.00216.42
7.4.200.0100.00416.41
7.4.190.0090.00616.38
7.4.180.0100.00316.53
7.4.160.0080.00716.36
7.4.150.0100.00516.42
7.4.140.0100.00616.43
7.4.130.0110.00316.26
7.4.120.0120.00216.39
7.4.110.0110.00316.36
7.4.100.0120.00116.43
7.4.90.0120.00316.45
7.4.80.0070.00616.34
7.4.70.0100.00316.25
7.4.60.0100.00216.30
7.4.50.0020.00916.33
7.4.40.0090.00316.25
7.4.30.0080.00516.36
7.4.20.0070.00416.40
7.4.10.0050.00716.23
7.4.00.0050.00616.36

preferences:
132.76 ms | 403 KiB | 5 Q