3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ids = [1, 2, 'string']; array_filter($ids, function ($id) { $pass = is_numeric($id) && $id == (int) $id; assert($pass, $id . ' is not an integer'); return $pass; });

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.90.0000.01426.77
8.3.80.0120.00017.97
8.3.70.0160.00318.43
8.3.60.0110.00418.31
8.3.50.0160.00321.11
8.3.40.0100.00319.02
8.3.30.0060.00918.66
8.3.20.0080.00020.34
8.3.10.0040.00423.66
8.3.00.0050.00322.51
8.2.210.0000.00826.77
8.2.200.0060.00318.54
8.2.190.0100.01018.29
8.2.180.0060.00918.66
8.2.170.0140.00722.96
8.2.160.0070.00721.99
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00417.63
8.2.110.0100.00022.24
8.2.100.0060.00617.84
8.2.90.0040.00417.72
8.2.80.0000.00818.05
8.2.70.0030.00617.87
8.2.60.0050.00318.22
8.2.50.0030.00518.10
8.2.40.0040.00419.34
8.2.30.0080.00019.84
8.2.20.0030.00517.63
8.2.10.0040.00418.18
8.2.00.0050.00318.11
8.1.290.0030.00630.84
8.1.280.0000.01425.92
8.1.270.0080.00020.05
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00517.22
8.1.230.0000.01120.87
8.1.220.0000.00917.75
8.1.210.0050.00318.77
8.1.200.0030.00617.13
8.1.190.0040.00717.36
8.1.180.0080.00018.10
8.1.170.0000.00818.54
8.1.160.0040.00422.07
8.1.150.0030.00618.89
8.1.140.0030.00517.46
8.1.130.0030.00317.59
8.1.120.0040.00417.48
8.1.110.0030.00417.34
8.1.100.0000.00817.37
8.1.90.0000.00717.43
8.1.80.0000.00817.36
8.1.70.0000.00717.46
8.1.60.0080.00017.59
8.1.50.0080.00017.53
8.1.40.0030.00717.42
8.1.30.0040.00417.55
8.1.20.0030.00617.50
8.1.10.0080.00017.61
8.1.00.0000.00717.53
8.0.300.0030.00320.07
8.0.290.0040.00416.75
8.0.280.0040.00418.34
8.0.270.0000.00717.25
8.0.260.0000.00617.24
8.0.250.0040.00417.05
8.0.240.0030.00617.02
8.0.230.0060.00316.99
8.0.220.0000.00716.94
8.0.210.0000.00716.87
8.0.200.0000.00716.98
8.0.190.0030.00517.05
8.0.180.0040.00417.00
8.0.170.0000.00716.99
8.0.160.0040.00417.01
8.0.150.0070.00016.80
8.0.140.0040.00416.88
8.0.130.0000.00713.45
8.0.120.0000.01016.88
8.0.110.0040.00416.96
8.0.100.0000.00716.89
8.0.90.0040.00416.94
8.0.80.0180.00316.90
8.0.70.0050.00316.92
8.0.60.0040.00416.98
8.0.50.0000.00716.96
8.0.30.0110.00816.98
8.0.20.0040.01617.40
8.0.10.0000.00716.93
8.0.00.0120.00716.91
7.4.330.0000.00515.08
7.4.320.0060.00016.38
7.4.300.0030.00316.57
7.4.290.0040.00416.50
7.4.280.0000.00716.49
7.4.270.0030.00316.51
7.4.260.0050.00013.14
7.4.250.0000.00716.40
7.4.240.0040.00416.46
7.4.230.0000.00816.66
7.4.220.0070.01116.44
7.4.210.0050.01216.62
7.4.200.0040.00416.43
7.4.160.0060.01316.49
7.4.150.0160.00217.40
7.4.140.0130.00717.86
7.4.130.0080.01316.54
7.4.120.0090.01116.49
7.4.110.0040.01316.26
7.4.100.0140.01116.40
7.4.90.0100.01016.60
7.4.80.0120.01219.39
7.4.70.0130.00416.60
7.4.60.0100.00616.58
7.4.50.0000.00416.46
7.4.40.0070.01016.48
7.4.30.0090.00816.64
7.4.00.0100.00714.63
7.3.330.0000.00513.15
7.3.320.0040.00413.32
7.3.310.0030.00316.45
7.3.300.0030.00316.19
7.3.290.0000.00716.23
7.3.280.0110.00616.32
7.3.270.0110.00617.40
7.3.260.0080.00816.52
7.3.250.0090.01116.41
7.3.240.0120.00616.33
7.3.230.0060.01216.51
7.3.210.0130.00316.72
7.3.200.0090.00919.39
7.3.190.0030.01316.29
7.3.180.0060.01016.43
7.3.170.0080.00816.43
7.3.160.0070.01416.58
7.3.10.0130.00516.50
7.3.00.0080.00316.58
7.2.330.0070.01016.79
7.2.320.0120.00916.47
7.2.310.0080.00816.78
7.2.300.0100.00616.68
7.2.290.0160.00816.83
7.2.130.0040.00616.63
7.2.120.0110.00716.64
7.2.110.0000.01316.61
7.2.100.0060.00916.71
7.2.90.0090.00416.80
7.2.80.0070.00716.62
7.2.70.0050.01016.90
7.2.60.0050.01016.79
7.2.50.0110.00416.83
7.2.40.0050.00816.99
7.2.30.0070.00516.83
7.2.20.0040.01116.80
7.2.10.0090.00816.57
7.2.00.0070.00716.85
7.1.250.0070.00715.53
7.1.200.0090.00615.67
7.1.70.0000.00717.01
7.1.60.0100.01020.03
7.1.50.0090.01516.96
7.1.00.0030.07722.24
7.0.200.0050.00216.59
7.0.60.0000.07719.95
7.0.50.0130.05717.86
7.0.40.0000.05720.05
7.0.30.0400.04320.06
7.0.20.0200.04020.08
7.0.10.0100.07720.15
7.0.00.0030.04320.32
5.6.280.0000.07020.86
5.6.210.0100.07320.47
5.6.200.0030.05718.18
5.6.190.0070.08020.41
5.6.180.3700.04020.61
5.6.170.0430.04020.41
5.6.160.0070.03720.62
5.6.150.0100.06318.18
5.6.140.0070.03718.27
5.6.130.0000.06318.19
5.6.120.0030.04321.01
5.6.110.0130.03320.99
5.6.100.0100.05720.98
5.6.90.0070.08321.13
5.6.80.0100.05020.43
5.6.70.4670.04020.35
5.5.350.0200.03720.53
5.5.340.0070.08717.99
5.5.330.0030.06720.35
5.5.320.0230.04320.35
5.5.310.0300.07320.35
5.5.300.0030.06717.98
5.5.290.0070.06017.92
5.5.280.0070.07020.98
5.5.270.0030.05020.84
5.5.260.0100.03720.98
5.5.250.0030.04020.69
5.5.240.0200.06720.26
5.4.450.0900.06019.17
5.4.440.0730.05719.69
5.4.430.0770.05319.47
5.4.420.0730.05719.45
5.4.410.0900.03719.43
5.4.400.0770.05319.29
5.4.390.0670.06719.12
5.4.380.0700.05319.06
5.4.370.0800.05719.36
5.4.360.0670.06018.84
5.4.350.0770.05319.13
5.4.340.0870.04719.13
5.4.320.0770.05319.25
5.4.310.0770.05719.37
5.4.300.0830.04319.25
5.4.290.0670.05719.26
5.4.280.0670.05719.26
5.4.270.0800.05019.12
5.4.260.0870.05719.01
5.4.250.1000.04718.95
5.4.240.0970.04319.35
5.4.230.0730.06018.84
5.4.220.0830.05319.27
5.4.210.0830.04718.97
5.4.200.0200.05316.74
5.4.190.0200.04318.83
5.4.180.0400.06319.20
5.4.170.0900.05019.05
5.4.160.0630.05719.20
5.4.150.1030.03319.13
5.4.140.0770.05016.36
5.4.130.0930.04016.39
5.4.120.0730.05016.27
5.4.110.0700.05316.48
5.4.100.0800.05316.50
5.4.90.0770.05016.27
5.4.80.0730.05016.39
5.4.70.0700.05316.49
5.4.60.0230.05016.52
5.4.50.0100.04316.47
5.4.40.0230.04716.22
5.4.30.0230.05316.22
5.4.20.0270.07316.34

preferences:
46.05 ms | 402 KiB | 5 Q