3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_int($i) { if (preg_match('[^0-9]', $i)) { return 0; } else { return 1; } } function check_int1($i) { return (strval((int)$i) === strval($i)); } echo check_int1(-10) ? "It's an int\n" : "It's not an int\n"; echo check_int("-10") ? "It's an int\n" : "It's not an int\n";

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.70.0220.00018.56
8.3.60.0160.00616.88
8.3.50.0050.01422.14
8.3.40.0090.00618.71
8.3.30.0070.00718.86
8.3.20.0000.00720.16
8.3.10.0000.00823.62
8.3.00.0040.00419.50
8.2.180.0110.00418.41
8.2.170.0070.00722.96
8.2.160.0070.00720.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.04
8.2.110.0040.00422.24
8.2.100.0120.00019.60
8.2.90.0000.00819.28
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0080.00018.16
8.2.30.0000.00718.01
8.2.20.0040.00417.90
8.2.10.0040.00417.96
8.2.00.0000.00817.70
8.1.280.0070.00725.92
8.1.270.0060.00323.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0080.00318.97
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0080.00017.41
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0040.00422.09
8.1.150.0040.00418.59
8.1.140.0000.00817.41
8.1.130.0030.00317.70
8.1.120.0050.00317.54
8.1.110.0000.00817.52
8.1.100.0000.00717.57
8.1.90.0040.00417.43
8.1.80.0070.00017.46
8.1.70.0030.00317.53
8.1.60.0000.00817.67
8.1.50.0040.00417.67
8.1.40.0030.00617.51
8.1.30.0000.00817.74
8.1.20.0000.00817.61
8.1.10.0030.00617.49
8.1.00.0070.00017.47
8.0.300.0000.00718.77
8.0.290.0070.00017.05
8.0.280.0030.00318.29
8.0.270.0030.00317.11
8.0.260.0060.00017.04
8.0.250.0000.00616.99
8.0.240.0020.00517.02
8.0.230.0070.00017.02
8.0.220.0030.00316.96
8.0.210.0000.00716.90
8.0.200.0030.00316.97
8.0.190.0070.00016.92
8.0.180.0030.00516.98
8.0.170.0030.00617.01
8.0.160.0030.00316.81
8.0.150.0000.00716.93
8.0.140.0000.00816.94
8.0.130.0050.00013.33
8.0.120.0000.00816.77
8.0.110.0000.00716.83
8.0.100.0000.00716.79
8.0.90.0030.00616.95
8.0.80.0090.00616.96
8.0.70.0070.00016.78
8.0.60.0000.00716.86
8.0.50.0020.00516.91
8.0.30.0140.00517.16
8.0.20.0110.00817.40
8.0.10.0050.00316.98
8.0.00.0130.00516.64
7.4.330.0000.00615.00
7.4.320.0000.00616.70
7.4.300.0060.00016.68
7.4.290.0060.00316.56
7.4.280.0000.00716.68
7.4.270.0070.00016.64
7.4.260.0030.00316.70
7.4.250.0030.00516.70
7.4.240.0030.00316.74
7.4.230.0000.00716.77
7.4.220.0120.01216.80
7.4.210.0030.01316.72
7.4.200.0000.00716.74
7.4.190.0030.00516.91
7.4.160.0180.00316.41
7.4.150.0100.01017.40
7.4.140.0110.00617.86
7.4.130.0110.00816.83
7.4.120.0100.00716.71
7.4.110.0130.01016.70
7.4.100.0130.01016.58
7.4.90.0140.00716.63
7.4.80.0100.01019.39
7.4.70.0090.01316.73
7.4.60.0090.00616.68
7.4.50.0000.00516.64
7.4.40.0040.00922.77
7.4.30.0060.01016.67
7.4.00.0120.00315.31
7.3.330.0050.00013.48
7.3.320.0000.00713.43
7.3.310.0040.00416.49
7.3.300.0030.00316.50
7.3.290.0150.00316.45
7.3.280.0110.00516.42
7.3.270.0070.01017.40
7.3.260.0160.00716.83
7.3.250.0100.00716.60
7.3.240.0070.01016.43
7.3.230.0100.00716.71
7.3.210.0080.00816.58
7.3.200.0130.00319.39
7.3.190.0140.00416.63
7.3.180.0160.00316.81
7.3.170.0080.00816.55
7.3.160.0120.00616.55
7.3.120.0040.00915.03
7.3.110.0060.00915.02
7.3.100.0050.01014.91
7.3.90.0070.01014.99
7.3.80.0030.01415.29
7.3.70.0040.00715.05
7.3.60.0070.00314.67
7.3.50.0030.00715.01
7.3.40.0070.00715.04
7.3.30.0090.00614.89
7.3.20.0030.01316.70
7.3.10.0050.00716.54
7.3.00.0100.00316.51
7.2.330.0000.01716.60
7.2.320.0000.01816.77
7.2.310.0140.00316.71
7.2.300.0140.00316.58
7.2.290.0100.00716.89
7.2.250.0000.01814.95
7.2.240.0100.00715.20
7.2.230.0080.00615.28
7.2.220.0060.00615.06
7.2.210.0030.01015.12
7.2.200.0080.00415.13
7.2.190.0030.01015.04
7.2.180.0040.01015.13
7.2.170.0080.00315.34
7.2.160.0030.00615.22
7.2.150.0110.00417.00
7.2.140.0090.00616.95
7.2.130.0130.00816.76
7.2.120.0150.00317.04
7.2.110.0030.01516.81
7.2.100.0120.00916.94
7.2.90.0170.00717.18
7.2.80.0100.01017.04
7.2.70.0060.01817.02
7.2.60.0120.00916.96
7.2.50.0120.00317.05
7.2.40.0160.00317.09
7.2.30.0070.00716.88
7.2.20.0120.00416.98
7.2.10.0120.00316.96
7.2.00.0030.00818.17
7.1.330.0000.01916.13
7.1.320.0060.00315.81
7.1.310.0070.00715.92
7.1.300.0030.00715.81
7.1.290.0040.00815.67
7.1.280.0030.01015.68
7.1.270.0030.01415.98
7.1.260.0060.00915.92
7.1.250.0070.01015.93
7.1.240.0040.01315.75
7.1.230.0000.01615.97
7.1.220.0060.00615.68
7.1.210.0100.01015.75
7.1.200.0050.01415.93
7.1.190.0120.00915.91
7.1.180.0040.01815.84
7.1.170.0060.01315.82
7.1.160.0140.00516.04
7.1.150.0100.01015.89
7.1.140.0070.00716.01
7.1.130.0100.00315.88
7.1.120.0000.01216.00
7.1.110.0060.01016.16
7.1.100.0070.00517.05
7.1.90.0040.00715.97
7.1.80.0040.01115.99
7.1.70.0020.00916.70
7.1.60.0040.00716.62
7.1.50.0020.01316.53
7.1.40.0150.00015.98
7.1.30.0070.00716.03
7.1.20.0000.00915.77
7.1.10.0030.01315.61
7.1.00.0020.04519.12
7.0.330.0070.00715.52
7.0.320.0080.00515.51
7.0.310.0110.00715.57
7.0.300.0110.00715.74
7.0.290.0030.01015.65
7.0.280.0030.01015.60
7.0.270.0080.00315.44
7.0.260.0070.00715.41
7.0.250.0120.00315.47
7.0.240.0000.00915.50
7.0.230.0040.00415.69
7.0.220.0000.01015.38
7.0.210.0070.00415.61
7.0.200.0080.01016.36
7.0.190.0070.01015.43
7.0.180.0120.00315.71
7.0.170.0030.01015.65
7.0.160.0000.01515.37
7.0.150.0000.01315.73
7.0.140.0030.04218.90
7.0.130.0130.00015.21
7.0.120.0000.01215.56
7.0.110.0000.01215.52
7.0.100.0080.03517.82
7.0.90.0090.03317.64
7.0.80.0080.02017.85
7.0.70.0200.04017.67
7.0.60.0260.04117.76
7.0.50.0100.03918.01
7.0.40.0140.03816.76
7.0.30.0070.02316.93
7.0.20.0090.03416.92
7.0.10.0050.04616.95
7.0.00.0070.04716.78
5.6.400.0090.00614.66
5.6.390.0090.00914.57
5.6.380.0100.01014.29
5.6.370.0140.00414.65
5.6.360.0040.01214.36
5.6.350.0120.00514.36
5.6.340.0030.01514.18
5.6.330.0110.00014.62
5.6.320.0000.01514.39
5.6.310.0140.00314.55
5.6.300.0060.01014.18
5.6.290.0030.00913.99
5.6.280.0030.04117.47
5.6.270.0120.00014.42
5.6.260.0030.00514.16
5.6.250.0030.03217.53
5.6.240.0050.04517.47
5.6.230.0070.03817.62
5.6.220.0070.03817.42
5.6.210.0080.02717.48
5.6.200.0050.04417.81
5.6.190.0120.03517.61
5.6.180.0130.04017.69
5.6.170.0000.05117.78
5.6.160.0050.04017.76
5.6.150.0050.02917.85
5.6.140.0050.02817.60
5.6.130.0120.04017.72
5.6.120.0050.04617.78
5.6.110.0070.04317.61
5.6.100.0050.04217.73
5.6.90.0080.04717.86
5.6.80.0080.03817.41
5.6.70.0030.04217.32
5.6.60.0060.04317.47
5.6.50.0120.03017.39
5.6.40.0100.04317.42
5.6.30.0080.02517.38
5.6.20.0030.03017.38
5.6.10.0090.03717.31
5.6.00.0070.04517.21
5.5.380.0050.02817.29
5.5.370.0080.04717.43
5.5.360.0080.02517.47
5.5.350.0030.03717.53
5.5.340.0070.04217.42
5.5.330.0080.04017.70
5.5.320.0050.02817.61
5.5.310.0150.03817.61
5.5.300.0050.02817.62
5.5.290.0100.03717.76
5.5.280.0050.02617.51
5.5.270.0080.04117.62
5.5.260.0070.04417.53
5.5.250.0070.03917.32
5.5.240.0050.04417.19
5.5.230.0090.04117.22
5.5.220.0030.03017.21
5.5.210.0110.03617.33
5.5.200.0100.04017.19
5.5.190.0060.03517.28
5.5.180.0050.04617.26
5.5.170.0040.00814.07
5.5.160.0030.03817.31
5.5.150.0100.02517.23
5.5.140.0150.02717.21
5.5.130.0060.04216.91
5.5.120.0100.03317.24
5.5.110.0070.04417.20
5.5.100.0070.04317.13
5.5.90.0050.03517.08
5.5.80.0110.04017.10
5.5.70.0080.04417.12
5.5.60.0070.03517.06
5.5.50.0100.02117.24
5.5.40.0100.03316.97
5.5.30.0060.04017.02
5.5.20.0050.04517.14
5.5.10.0080.03117.13
5.5.00.0070.03717.15
5.4.450.0080.02715.91
5.4.440.0030.04315.95
5.4.430.0080.04215.93
5.4.420.0100.03815.92
5.4.410.0060.02215.83
5.4.400.0070.02315.72
5.4.390.0040.04215.71
5.4.380.0000.03415.74
5.4.370.0070.03815.63
5.4.360.0050.03715.80
5.4.350.0100.03715.62
5.4.340.0030.02615.75
5.4.330.0000.00612.37
5.4.320.0080.03315.68
5.4.310.0060.03815.62
5.4.300.0050.02315.76
5.4.290.0050.02115.62
5.4.280.0130.03615.71
5.4.270.0060.04015.74
5.4.260.0110.03515.61
5.4.250.0030.04315.75
5.4.240.0070.03815.75
5.4.230.0050.03715.70
5.4.220.0020.02915.78
5.4.210.0060.03815.75
5.4.200.0070.04315.73
5.4.190.0070.04215.69
5.4.180.0070.02215.74
5.4.170.0120.03515.72
5.4.160.0060.02315.74
5.4.150.0080.03515.75
5.4.140.0050.03114.38
5.4.130.0020.02314.42
5.4.120.0050.03914.42
5.4.110.0070.03914.43
5.4.100.0040.03314.44
5.4.90.0030.04114.46
5.4.80.0090.03514.36
5.4.70.0050.04014.41
5.4.60.0030.02614.42
5.4.50.0050.02314.33
5.4.40.0040.02214.37
5.4.30.0070.02514.45
5.4.20.0080.02514.41
5.4.10.0050.03914.38
5.4.00.0080.03014.12
5.3.290.0060.02413.51
5.3.280.0050.03813.53
5.3.270.0080.03013.47
5.3.260.0050.04113.48
5.3.250.0030.02213.48
5.3.240.0050.04013.54
5.3.230.0020.04013.53
5.3.220.0030.02513.46
5.3.210.0060.02213.50
5.3.200.0100.03313.46
5.3.190.0070.02713.44
5.3.180.0080.02013.48
5.3.170.0070.03213.47
5.3.160.0040.03213.49
5.3.150.0040.02313.44
5.3.140.0040.02313.47
5.3.130.0040.03913.45
5.3.120.0070.04013.49
5.3.110.0030.04513.49
5.3.100.0100.03513.17
5.3.90.0040.03213.20
5.3.80.0050.02213.21
5.3.70.0050.04013.19
5.3.60.0020.02313.23
5.3.50.0050.03813.10
5.3.40.0050.02413.19
5.3.30.0050.03413.10
5.3.20.0050.03313.05
5.3.10.0070.03013.04
5.3.00.0090.03313.06
5.2.170.0070.05311.15
5.2.160.0070.05711.24
5.2.150.0130.02711.04
5.2.140.0000.04311.15
5.2.130.0070.05711.09
5.2.120.0000.04011.02
5.2.110.0000.03711.16
5.2.100.0100.03011.12
5.2.90.0170.04710.92
5.2.80.0070.06311.02
5.2.70.0000.06711.23
5.2.60.0030.06310.93
5.2.50.0070.06710.93
5.2.40.0100.05711.10
5.2.30.0030.04710.99
5.2.20.0030.05711.10
5.2.10.0070.06011.00
5.2.00.0030.03010.78
5.1.60.0070.0479.99
5.1.50.0030.03010.08
5.1.40.0070.0309.97
5.1.30.0100.05010.33
5.1.20.0030.05710.38
5.1.10.0070.04010.07
5.1.00.0000.0579.96
5.0.50.0000.0478.62
5.0.40.0000.0478.52
5.0.30.0000.0638.29
5.0.20.0070.0438.29
5.0.10.0030.0408.29
5.0.00.0130.0438.29
4.4.90.0000.0278.29
4.4.80.0000.0338.29
4.4.70.0030.0178.29
4.4.60.0070.0308.29
4.4.50.0070.0338.29
4.4.40.0100.0408.29
4.4.30.0030.0338.29
4.4.20.0070.0208.29
4.4.10.0000.0238.29
4.4.00.0200.0208.29
4.3.110.0000.0308.29
4.3.100.0030.0338.29
4.3.90.0030.0278.29
4.3.80.0070.0238.29
4.3.70.0000.0338.29
4.3.60.0030.0338.29
4.3.50.0000.0338.29
4.3.40.0070.0378.29
4.3.30.0000.0378.29
4.3.20.0030.0378.29
4.3.10.0000.0408.29
4.3.00.0000.0308.29

preferences:
73.71 ms | 401 KiB | 5 Q