3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseIntOrException($val) { $int = (int)$val; if ((string)$int !== (string)$val) { return FALSE; } return $int; } $result = array(); foreach (array(1, '2', '3.0', 4.0, 5,0,'0') as $x) { $result[var_export($x, TRUE)] = var_export(parseIntOrException($x), TRUE); } print_r($result);

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.0080.00816.50
8.3.50.0090.01022.11
8.3.40.0040.01118.89
8.3.30.0140.00318.70
8.3.20.0040.00420.39
8.3.10.0080.00023.49
8.3.00.0080.00019.38
8.2.180.0070.01416.50
8.2.170.0070.00722.96
8.2.160.0070.01022.13
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00619.36
8.2.120.0050.00226.35
8.2.110.0100.00020.88
8.2.100.0040.00717.91
8.2.90.0000.00919.09
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0060.00317.92
8.2.50.0040.00418.10
8.2.40.0060.00320.59
8.2.30.0070.00020.76
8.2.20.0030.00517.70
8.2.10.0000.00717.98
8.2.00.0000.00818.13
8.1.280.0160.00025.92
8.1.270.0060.00322.08
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0040.00421.00
8.1.230.0080.00319.11
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0040.00417.23
8.1.180.0090.00018.10
8.1.170.0060.00318.55
8.1.160.0070.00021.86
8.1.150.0000.00818.83
8.1.140.0000.00919.48
8.1.130.0070.00017.64
8.1.120.0040.00417.47
8.1.110.0040.00417.29
8.1.100.0050.00317.44
8.1.90.0070.00017.29
8.1.80.0040.00417.41
8.1.70.0040.00417.45
8.1.60.0040.00417.48
8.1.50.0040.00417.50
8.1.40.0080.00417.59
8.1.30.0000.00817.65
8.1.20.0040.00417.70
8.1.10.0090.00017.49
8.1.00.0000.00717.41
8.0.300.0000.00718.77
8.0.290.0000.00716.58
8.0.280.0070.00018.33
8.0.270.0070.00017.11
8.0.260.0000.00617.14
8.0.250.0070.00016.90
8.0.240.0000.00816.93
8.0.230.0050.00216.88
8.0.220.0040.00416.73
8.0.210.0030.00316.80
8.0.200.0050.00216.79
8.0.190.0000.00716.79
8.0.180.0050.00316.90
8.0.170.0040.00416.91
8.0.160.0040.00416.89
8.0.150.0030.00516.85
8.0.140.0030.00716.80
8.0.130.0060.00013.28
8.0.120.0000.00816.78
8.0.110.0000.00816.67
8.0.100.0070.00016.93
8.0.90.0000.00816.69
8.0.80.0090.00616.79
8.0.70.0000.00816.74
8.0.60.0040.00416.89
8.0.50.0040.00416.91
8.0.30.0140.00817.00
8.0.20.0070.01117.40
8.0.10.0000.00716.77
8.0.00.0090.00816.87
7.4.330.0000.00516.66
7.4.320.0000.00716.44
7.4.300.0030.00316.61
7.4.290.0030.00316.54
7.4.280.0050.00616.49
7.4.270.0030.00316.54
7.4.260.0030.00316.51
7.4.250.0070.00016.46
7.4.240.0030.00416.54
7.4.230.0000.00716.26
7.4.220.0120.01316.36
7.4.210.0060.00916.51
7.4.200.0040.00416.49
7.4.160.0050.01016.32
7.4.150.0120.00617.40
7.4.140.0130.00517.86
7.4.130.0090.00916.51
7.4.120.0070.01416.58
7.4.110.0130.00316.47
7.4.100.0030.01316.47
7.4.90.0080.00816.52
7.4.80.0030.01419.39
7.4.70.0140.00916.45
7.4.60.0160.00016.47
7.4.50.0040.01516.39
7.4.40.0110.00616.38
7.4.30.0160.00616.69
7.4.00.0100.00314.58
7.3.330.0050.00013.22
7.3.320.0030.00313.40
7.3.310.0000.00716.20
7.3.300.0040.00416.26
7.3.290.0030.00316.38
7.3.280.0060.01116.36
7.3.270.0000.01717.40
7.3.260.0130.01016.48
7.3.250.0130.00716.36
7.3.240.0090.00816.67
7.3.230.0070.01016.39
7.3.210.0130.00316.58
7.3.200.0020.01516.35
7.3.190.0050.01116.50
7.3.180.0100.00716.41
7.3.170.0100.00716.40
7.3.160.0090.00816.50
7.3.120.0060.00914.66
7.3.110.0100.00714.84
7.3.100.0060.00914.48
7.3.90.0130.00014.71
7.3.80.0140.00314.59
7.3.70.0120.00314.80
7.3.60.0040.01114.85
7.3.50.0080.00414.94
7.3.40.0000.01014.88
7.3.30.0060.00614.93
7.3.20.0120.00616.76
7.3.10.0100.00716.52
7.3.00.0060.00916.54
7.2.330.0160.00316.54
7.2.320.0100.00716.75
7.2.310.0080.01616.68
7.2.300.0120.00616.38
7.2.290.0110.00816.59
7.2.240.0030.01015.09
7.2.230.0030.01014.55
7.2.220.0000.01114.88
7.2.210.0040.01114.86
7.2.200.0070.01014.97
7.2.190.0070.01114.77
7.2.180.0030.01215.08
7.2.170.0100.00714.82
7.2.160.0000.01715.18
7.2.150.0060.00916.81
7.2.140.0130.00317.07
7.2.130.0030.01016.92
7.2.120.0060.01016.59
7.2.110.0080.00416.96
7.2.100.0000.01516.94
7.2.90.0040.01116.90
7.2.80.0110.00716.53
7.2.70.0070.00716.97
7.2.60.0090.00516.86
7.2.50.0150.00316.70
7.2.40.0130.00316.64
7.2.30.0070.01116.85
7.2.20.0070.00716.95
7.2.10.0080.00816.71
7.2.00.0690.00218.08
7.1.330.0060.00915.82
7.1.320.0000.00815.59
7.1.310.0030.01215.71
7.1.300.0160.00015.66
7.1.290.0090.00915.88
7.1.280.0040.01215.58
7.1.270.0090.00315.48
7.1.260.0070.00715.84
7.1.250.0040.01115.86
7.1.200.0090.00315.93
7.1.100.0070.01017.95
7.1.70.0030.01217.19
7.1.60.0070.01819.48
7.1.50.0060.00916.94
7.1.00.0070.07322.27
7.0.200.0580.00414.79
7.0.60.0070.08719.94
7.0.50.0100.07317.88
7.0.40.0070.08720.15
7.0.30.0070.04020.11
7.0.20.0300.08320.21
7.0.10.0130.08320.25
7.0.00.0130.07720.16
5.6.280.0000.03320.87
5.6.210.0070.07320.63
5.6.200.0070.07718.21
5.6.190.0030.06720.58
5.6.180.0230.06020.46
5.6.170.0300.07720.48
5.6.160.0070.04020.61
5.6.150.0030.06018.15
5.6.140.0030.04018.25
5.6.130.0100.08318.18
5.6.120.0100.07721.01
5.6.110.0030.04021.02
5.6.100.0070.04021.04
5.6.90.0100.07320.96
5.6.80.0070.03720.29
5.5.350.3870.04320.30
5.5.340.0130.07318.07
5.5.330.0100.06020.40
5.5.320.0530.04020.34
5.5.310.0400.06320.35
5.5.300.0070.05018.08
5.5.290.0070.05017.97
5.5.280.0100.08320.73
5.5.270.0170.07320.71
5.5.260.0100.08020.87
5.5.250.0100.06320.61
5.5.240.0070.04720.07

preferences:
71.96 ms | 401 KiB | 5 Q