3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '0x123'; if (!is_numeric($str)) { throw new Exception('Not a number'); } // Exception not thrown, instead wrong result is generated here: $n = (int) $str; // 0

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.00616.75
8.3.50.0070.01120.99
8.3.40.0140.00318.76
8.3.30.0140.00018.68
8.3.20.0040.00420.27
8.3.10.0040.00423.39
8.3.00.0040.00419.69
8.2.180.0140.00718.29
8.2.170.0120.00322.96
8.2.160.0030.01320.29
8.2.150.0030.00524.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00417.75
8.2.110.0080.00422.08
8.2.100.0090.00318.04
8.2.90.0070.00019.17
8.2.80.0060.00317.97
8.2.70.0080.00417.50
8.2.60.0030.00518.05
8.2.50.0000.00818.07
8.2.40.0000.00821.07
8.2.30.0040.00420.53
8.2.20.0070.00417.69
8.2.10.0040.00418.17
8.2.00.0040.00418.09
8.1.280.0120.00325.92
8.1.270.0110.00323.79
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.61
8.1.230.0100.00317.66
8.1.220.0030.00617.88
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0070.00018.10
8.1.170.0030.00520.42
8.1.160.0040.00421.88
8.1.150.0040.00418.82
8.1.140.0040.00419.49
8.1.130.0000.00717.60
8.1.120.0050.00217.30
8.1.110.0070.00017.46
8.1.100.0000.00717.44
8.1.90.0040.00417.36
8.1.80.0040.00417.37
8.1.70.0080.00017.39
8.1.60.0030.00517.57
8.1.50.0000.00917.51
8.1.40.0110.00017.54
8.1.30.0080.00017.64
8.1.20.0000.00817.65
8.1.10.0000.00817.52
8.1.00.0040.00417.52
8.0.300.0080.00018.96
8.0.290.0030.00616.75
8.0.280.0070.00018.45
8.0.270.0070.00017.29
8.0.260.0060.00017.21
8.0.250.0030.00616.99
8.0.240.0000.00816.92
8.0.230.0040.00417.01
8.0.220.0030.00316.91
8.0.210.0000.00816.82
8.0.200.0070.00016.99
8.0.190.0040.00417.01
8.0.180.0000.00716.98
8.0.170.0040.00416.96
8.0.160.0050.00316.84
8.0.150.0000.00816.91
8.0.140.0050.00316.88
8.0.130.0030.00313.30
8.0.120.0000.00716.89
8.0.110.0060.00316.94
8.0.100.0040.00416.91
8.0.90.0030.00416.89
8.0.80.0060.00916.93
8.0.70.0040.00416.77
8.0.60.0090.00016.97
8.0.50.0080.00016.79
8.0.30.0120.00917.26
8.0.20.0120.00717.40
8.0.10.0000.00816.95
8.0.00.0130.00616.82
7.4.330.0000.00515.08
7.4.320.0030.00316.40
7.4.300.0000.00616.59
7.4.290.0000.00716.64
7.4.280.0040.00416.52
7.4.270.0040.00416.60
7.4.260.0040.00416.59
7.4.250.0000.00716.55
7.4.240.0050.00216.53
7.4.230.0030.00316.66
7.4.220.0090.01216.34
7.4.210.0060.00916.65
7.4.200.0000.00716.43
7.4.160.0090.00616.61
7.4.150.0100.01017.40
7.4.140.0120.00917.86
7.4.130.0100.01016.41
7.4.120.0120.00916.55
7.4.110.0070.01016.42
7.4.100.0090.00916.65
7.4.90.0060.01016.51
7.4.80.0030.01319.39
7.4.70.0060.01116.46
7.4.60.0040.01916.71
7.4.50.0050.00316.55
7.4.40.0130.00316.46
7.4.30.0090.01316.71
7.4.00.0100.00714.88
7.3.330.0030.00313.02
7.3.320.0050.00013.13
7.3.310.0000.00716.18
7.3.300.0050.00316.29
7.3.290.0110.00616.25
7.3.280.0090.01016.22
7.3.270.0100.00617.40
7.3.260.0030.01316.32
7.3.240.0110.01016.38
7.3.230.0090.00916.52
7.3.210.0100.00616.20
7.3.200.0130.00316.33
7.3.190.0000.01716.31
7.3.180.0060.00916.26
7.3.170.0100.01016.44
7.3.160.0150.00316.37
7.2.330.0170.00316.51
7.2.320.0150.00916.54
7.2.310.0050.01316.75
7.2.300.0080.00816.66
7.2.290.0140.00416.64
7.2.60.0070.01016.87
7.2.00.0000.01319.31
7.1.200.0000.00815.51
7.1.100.0000.01517.88
7.1.70.0140.00317.21
7.1.60.0100.01419.50
7.1.50.0090.01216.63
7.1.00.0000.08022.43
7.0.200.0000.00816.74
7.0.60.0070.05719.86
7.0.50.0030.07317.88
7.0.40.0000.04720.27
7.0.30.0530.06020.13
7.0.20.0200.08320.16
7.0.10.0430.06720.13
7.0.00.0000.09720.18
5.6.280.0000.03320.78
5.6.210.0070.04320.72
5.6.200.0100.05018.18
5.6.190.0070.08720.76
5.6.180.0030.04320.38
5.6.170.0230.07720.44
5.6.160.0070.07020.40
5.6.150.0070.05018.15
5.6.140.0170.07018.09
5.6.130.0100.08018.21
5.6.120.0030.04321.11
5.6.110.0170.08021.04
5.6.100.0000.08321.05
5.6.90.0100.08021.00
5.6.80.0170.07020.54
5.6.70.0200.06320.36
5.5.350.0230.07320.49
5.5.340.0030.04717.92
5.5.330.0100.04320.21
5.5.320.0300.07020.15
5.5.310.0270.07320.21
5.5.300.0070.05317.97
5.5.290.0030.07017.88
5.5.280.0000.08020.80
5.5.270.0030.04020.64
5.5.260.0130.08320.76
5.5.250.0070.06020.46
5.5.240.0070.08320.23
5.4.450.0900.05319.55
5.4.440.0830.05719.41
5.4.430.0700.06319.60
5.4.420.0770.05319.47
5.4.410.0700.06319.39
5.4.400.0830.05319.30
5.4.390.0900.05019.19
5.4.380.0830.06318.93
5.4.370.0770.06719.26
5.4.360.0830.06719.16
5.4.350.0800.06319.22
5.4.340.0900.07319.19
5.4.320.0730.06319.14
5.4.310.0730.06719.15
5.4.300.0630.05718.93
5.4.290.0700.05719.14
5.4.280.0630.07019.21
5.4.270.0870.05318.94
5.4.260.0930.04319.31
5.4.250.0700.06319.30
5.4.240.0930.05019.27
5.4.230.0700.06318.99
5.4.220.0830.05018.91
5.4.210.0930.04319.27
5.4.200.0930.03719.08
5.4.190.0930.03718.93
5.4.180.0870.04719.18
5.4.170.0800.06019.29
5.4.160.0830.06018.79
5.4.150.0900.07719.25
5.4.140.0930.06716.26
5.4.130.0900.06316.48
5.4.120.0870.06716.41
5.4.110.0770.04316.48
5.4.100.0130.06016.18
5.4.90.0070.06016.56
5.4.80.0200.03716.35
5.4.70.0530.05716.19
5.4.60.0730.06016.45
5.4.50.0800.05016.18
5.4.40.0770.05316.34
5.4.30.0730.05716.42
5.4.20.0670.04016.35
5.4.10.0600.05316.44
5.4.00.0830.04715.66

preferences:
47.2 ms | 401 KiB | 5 Q