3v4l.org

run code in 200+ PHP versions simultaneously
<?php // the filter_* functions trim whitespace which can result in data loss var_dump(filter_var(" 1 ", FILTER_VALIDATE_INT)); // because filter_var casts passed values to a string, it accepts various unsafe values var_dump(filter_var(true, FILTER_VALIDATE_INT)); var_dump(filter_var(new NotAnInt(), FILTER_VALIDATE_INT)); var_dump(filter_var(1.00000000000001, FILTER_VALIDATE_INT)); class NotAnInt { function __toString() { return " 1"; } }
based on OK3RF

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)
7.4.10.0070.01115.05
7.4.00.0050.01214.61
7.3.130.0030.00914.52
7.3.120.0090.00914.87
7.3.110.0070.01114.70
7.3.100.0000.01414.48
7.3.90.0150.00314.82
7.3.80.0070.00314.47
7.3.70.0000.01314.66
7.3.60.0100.00714.60
7.3.50.0070.01014.50
7.3.40.0060.00614.65
7.3.30.0100.00714.60
7.3.20.0000.01216.57
7.3.10.0030.01016.42
7.3.00.0030.00916.48
7.2.260.0100.01014.41
7.2.250.0070.01114.99
7.2.240.0040.01114.99
7.2.230.0000.01714.68
7.2.220.0000.01914.89
7.2.210.0120.00414.68
7.2.200.0000.01314.98
7.2.190.0060.00914.89
7.2.180.0040.01114.91
7.2.170.0060.01214.70
7.2.160.0080.00814.93
7.2.150.0070.00716.31
7.2.140.0100.01016.70
7.2.130.0100.00316.89
7.2.120.0040.01116.79
7.2.110.0100.00716.69
7.2.100.0030.01316.64
7.2.90.0030.01216.86
7.2.80.0120.00316.76
7.2.70.0110.00316.42
7.2.60.0110.00516.73
7.2.50.0120.00816.75
7.2.40.0000.01416.78
7.2.30.0040.01216.84
7.2.20.0030.00716.67
7.2.10.0000.01216.65
7.2.00.0120.00316.66
7.1.330.0000.01515.50
7.1.320.0090.00915.66
7.1.310.0030.01015.36
7.1.300.0030.01415.69
7.1.290.0090.00015.53
7.1.280.0000.01415.43
7.1.270.0040.01115.61
7.1.260.0100.00715.64
7.1.250.0000.00815.52
7.1.240.0040.00815.81
7.1.230.0030.01015.42
7.1.220.0000.01415.45
7.1.210.0070.00715.45
7.1.200.0070.00815.60
7.1.190.0070.00715.55
7.1.180.0110.00715.51
7.1.170.0070.00715.35
7.1.160.0070.00715.57
7.1.150.0060.00615.54
7.1.140.0030.01215.72
7.1.130.0060.00615.64
7.1.120.0060.00315.52
7.1.110.0040.01215.48
7.1.100.0070.00715.72
7.1.90.0050.00515.78
7.1.80.0030.00715.47
7.1.70.0060.00616.37
7.1.60.0090.00917.45
7.1.50.0080.01016.05
7.1.40.0080.00815.53
7.1.30.0030.01015.37
7.1.20.0030.01015.74
7.1.10.0030.01415.59
7.1.00.0070.03719.17
7.0.330.0070.00715.25
7.0.320.0070.00715.22
7.0.310.0030.01015.03
7.0.300.0060.00315.18
7.0.290.0080.00415.25
7.0.280.0000.01015.19
7.0.270.0060.00615.28
7.0.260.0060.00915.17
7.0.250.0090.00915.36
7.0.240.0030.01115.38
7.0.230.0060.00615.50
7.0.220.0000.01214.96
7.0.210.0110.00415.04
7.0.200.0220.00614.73
7.0.190.0060.00615.18
7.0.180.0060.00915.27
7.0.170.0040.01115.28
7.0.160.0120.00315.29
7.0.150.0030.01015.29
7.0.140.0050.03818.63
7.0.130.0030.01015.17
7.0.120.0040.00715.13
7.0.110.0030.01015.26
7.0.100.0040.00815.31
7.0.90.0070.00315.17
7.0.80.0060.00615.39
7.0.70.0080.00515.36
7.0.60.0050.04417.49
7.0.50.0050.02216.56
7.0.40.0090.04116.68
7.0.30.0120.02516.63
7.0.20.0230.03816.78
7.0.10.0040.03416.84
7.0.00.0080.03516.77
5.6.400.0030.01514.13
5.6.390.0040.00414.07
5.6.380.0080.00414.10
5.6.370.0060.00314.39
5.6.360.0030.01014.02
5.6.350.0070.00314.25
5.6.340.0110.00314.33
5.6.330.0030.00714.39
5.6.320.0030.01314.20
5.6.310.0030.01014.26
5.6.300.0000.01214.26
5.6.290.0080.00814.38
5.6.280.0020.04317.58
5.6.270.0100.00314.34
5.6.260.0000.01114.33
5.6.250.0060.00314.00
5.6.240.0000.01714.18
5.6.230.0000.01714.33
5.6.220.0040.00414.33
5.6.210.0080.04017.25
5.6.200.0070.02215.99
5.6.190.0070.02917.24
5.6.180.0170.04217.44
5.6.170.0150.04517.41
5.6.160.0130.03517.28
5.6.150.0110.03616.19
5.6.140.0050.04016.27
5.6.130.0090.04016.12
5.6.120.0090.03917.59
5.6.110.0050.04717.45
5.6.100.0050.04517.41
5.6.90.0170.03717.57
5.6.80.0020.04517.17
5.6.70.0090.00314.10
5.6.60.0030.00613.91
5.6.50.0080.00314.33
5.6.40.0070.00414.28
5.6.30.0030.01014.11
5.6.20.0030.01314.09
5.6.10.0070.00714.36
5.6.00.0030.00914.04
5.5.380.0050.00513.96
5.5.370.0040.01113.96
5.5.360.0030.00913.96
5.5.350.0220.04017.27
5.5.340.0120.03216.10
5.5.330.0070.04517.33
5.5.320.0070.04417.19
5.5.310.0130.03617.26
5.5.300.0090.04316.20
5.5.290.0030.02816.00
5.5.280.0050.03217.49
5.5.270.0050.02417.50
5.5.260.0090.02017.53
5.5.250.0100.02017.29
5.5.240.0020.02917.20
5.5.230.0060.01014.15
5.5.220.0040.00813.70
5.5.210.0080.00313.92
5.5.200.0040.00714.00
5.5.190.0090.00013.98
5.5.180.0060.00713.92
5.5.170.0070.00314.02
5.5.160.0090.00313.78
5.5.150.0030.01014.18
5.5.140.0040.00814.09
5.5.130.0000.00914.22
5.5.120.0000.00813.66
5.5.110.0000.01014.24
5.5.100.0030.01014.04
5.5.90.0040.01113.84
5.5.80.0040.01113.89
5.5.70.0040.00814.12
5.5.60.0030.00913.86
5.5.50.0100.00014.20
5.5.40.0030.00713.82
5.5.30.0000.01214.29
5.5.20.0030.00913.93
5.5.10.0000.00814.03
5.5.00.0030.00614.11
5.4.450.0350.03015.55
5.4.440.0540.03715.68
5.4.430.0470.03215.78
5.4.420.0560.02815.65
5.4.410.0490.02815.49
5.4.400.0430.02815.52
5.4.390.0080.03215.20
5.4.380.0500.03315.29
5.4.370.0130.02515.30
5.4.360.0640.03015.31
5.4.350.0120.03015.22
5.4.340.0600.03015.31
5.4.330.0030.00611.90
5.4.320.0160.02515.17
5.4.310.0150.02315.22
5.4.300.0620.03315.22
5.4.290.0030.03815.30
5.4.280.0130.03315.22
5.4.270.0620.03015.23
5.4.260.0150.02615.16
5.4.250.0030.03715.31
5.4.240.0170.02715.34
5.4.230.0100.03315.18
5.4.220.0170.02715.31
5.4.210.0150.02515.31
5.4.200.0070.03114.34
5.4.190.0090.03115.28
5.4.180.0120.02715.25
5.4.170.0070.03415.22
5.4.160.0060.03615.32
5.4.150.0120.02715.22
5.4.140.0030.03314.08
5.4.130.0070.03014.17
5.4.120.0130.02514.16
5.4.110.0090.02914.04
5.4.100.0070.03414.08
5.4.90.0070.03214.11
5.4.80.0100.03214.15
5.4.70.0080.02914.10
5.4.60.0100.02514.09
5.4.50.0130.02514.11
5.4.40.0110.02714.08
5.4.30.0140.02314.15
5.4.20.0130.02514.08
5.4.10.0080.03014.04
5.4.00.0160.02513.89
5.3.290.0170.06014.77
5.3.280.0170.05714.64
5.3.270.0130.06314.66
5.3.260.0200.05014.78
5.3.250.0200.05014.82
5.3.240.0130.05714.82
5.3.230.0270.04314.62
5.3.220.0170.05314.59
5.3.210.0100.06014.59
5.3.200.0130.05314.73
5.3.190.0230.04314.59
5.3.180.0170.05014.57
5.3.170.0200.05014.58
5.3.160.0270.04014.58
5.3.150.0170.05314.66
5.3.140.0230.04314.66
5.3.130.0170.05714.64
5.3.120.2470.06314.54
5.3.110.0170.05314.71
5.3.100.0170.05014.25
5.3.90.0230.04714.07
5.3.80.0130.05714.05
5.3.70.0130.05314.14
5.3.60.0200.04714.07
5.3.50.0100.05714.04
5.3.40.0130.05314.06
5.3.30.0100.05714.11
5.3.20.0170.04713.80
5.3.10.0200.04013.77
5.3.00.0130.05313.64
5.2.170.0130.04311.19
5.2.160.0130.04011.21
5.2.150.0130.04011.19
5.2.140.0130.04011.24
5.2.130.0100.04311.21
5.2.120.0170.03311.10
5.2.110.0100.04011.12
5.2.100.0230.02711.32
5.2.90.0200.03311.21
5.2.80.0130.04011.14
5.2.70.1800.05311.13
5.2.60.0170.03711.08
5.2.50.0130.04311.14
5.2.40.0170.03711.02
5.2.30.0100.04311.02
5.2.20.0100.05310.93
5.2.10.0130.05310.91
5.2.00.0070.04310.73
5.1.60.2070.03310.03
5.1.50.0170.03010.11
5.1.40.0070.04010.00
5.1.30.1600.04010.43
5.1.20.0170.03710.48
5.1.10.0100.03710.05
5.1.00.0170.03010.26
5.0.50.0100.0278.67
5.0.40.0170.0178.43
5.0.30.0030.0478.41
5.0.20.0030.0308.39
5.0.10.0030.0308.20
5.0.00.0070.0438.26
4.4.90.0100.0175.96
4.4.80.0070.0206.00
4.4.70.0030.0335.91
4.4.60.0070.0275.92
4.4.50.0100.0205.87
4.4.40.0000.0405.91
4.4.30.0000.0305.96
4.4.20.0030.0236.05
4.4.10.0070.0206.07
4.4.00.0070.0375.91
4.3.110.0030.0235.95
4.3.100.0100.0175.82
4.3.90.0030.0205.85
4.3.80.0100.0335.82
4.3.70.0030.0235.82
4.3.60.0070.0205.82
4.3.50.0030.0235.84
4.3.40.0070.0335.76
4.3.30.0000.0234.59
4.3.20.0070.0174.55
4.3.10.0030.0204.50
4.3.00.0030.01314.56