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.60.0070.00718.40
8.3.50.0080.00921.98
8.3.40.0130.00718.92
8.3.30.0110.00418.79
8.3.20.0080.00018.93
8.3.10.0040.00420.70
8.3.00.0050.00321.69
8.2.180.0120.00316.88
8.2.170.0040.01122.96
8.2.160.0140.00020.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0110.00421.30
8.2.110.0070.00320.57
8.2.100.0060.00617.91
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0050.00317.75
8.2.60.0030.00617.92
8.2.50.0050.00318.07
8.2.40.0050.00417.97
8.2.30.0000.00819.81
8.2.20.0000.00717.81
8.2.10.0040.00417.83
8.2.00.0080.00017.72
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0080.01226.35
8.1.250.0050.00228.09
8.1.240.0070.00322.10
8.1.230.0070.00322.09
8.1.220.0040.00418.77
8.1.210.0000.00818.77
8.1.200.0040.00417.22
8.1.190.0000.00717.39
8.1.180.0000.01018.10
8.1.170.0040.00418.71
8.1.160.0040.00418.85
8.1.150.0040.00418.57
8.1.140.0000.00717.42
8.1.130.0030.00317.77
8.1.120.0040.00417.44
8.1.110.0040.00417.54
8.1.100.0000.00717.50
8.1.90.0000.00717.54
8.1.80.0040.00417.56
8.1.70.0070.00017.52
8.1.60.0060.00317.70
8.1.50.0000.00717.59
8.1.40.0030.00617.61
8.1.30.0030.00517.75
8.1.20.0000.00917.66
8.1.10.0000.00817.71
8.1.00.0000.00817.52
8.0.300.0070.00020.02
8.0.290.0000.00916.63
8.0.280.0060.00318.49
8.0.270.0000.00717.09
8.0.260.0000.00716.86
8.0.250.0000.00717.01
8.0.240.0090.00017.06
8.0.230.0000.00717.02
8.0.220.0000.00716.86
8.0.210.0000.00716.92
8.0.200.0030.00316.92
8.0.190.0070.00016.85
8.0.180.0070.00016.84
8.0.170.0030.00616.86
8.0.160.0050.00216.97
8.0.150.0030.00616.89
8.0.140.0040.00416.85
8.0.130.0030.00313.38
8.0.120.0080.00016.87
8.0.110.0040.00416.81
8.0.100.0000.00716.79
8.0.90.0040.00416.88
8.0.80.0070.01416.85
8.0.70.0050.00216.78
8.0.60.0040.00416.89
8.0.50.0030.00616.92
8.0.30.0080.01217.17
8.0.20.0080.01117.40
8.0.10.0040.00416.98
8.0.00.0080.01717.01
7.4.330.0060.00014.86
7.4.320.0000.00716.76
7.4.300.0000.00616.74
7.4.290.0030.00316.65
7.4.280.0070.00316.55
7.4.270.0040.00416.69
7.4.260.0000.00613.44
7.4.250.0040.00416.73
7.4.240.0030.00316.67
7.4.230.0050.00216.48
7.4.220.0100.00716.66
7.4.210.0040.01116.72
7.4.200.0030.00516.85
7.4.190.0040.00416.86
7.4.160.0090.00916.63
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0100.00716.75
7.4.120.0090.00916.64
7.4.110.0150.00316.78
7.4.100.0000.01816.62
7.4.90.0140.00316.48
7.4.80.0060.01619.37
7.4.70.0100.01016.77
7.4.60.0120.00616.68
7.4.50.0030.00616.72
7.4.40.0000.01322.27
7.4.30.0080.00816.39
7.4.00.0070.01014.87
7.3.330.0000.00513.27
7.3.320.0030.00313.44
7.3.310.0030.00316.45
7.3.300.0000.00716.38
7.3.290.0060.00916.44
7.3.280.0090.00616.43
7.3.270.0130.00417.40
7.3.260.0080.01218.24
7.3.250.0120.00816.65
7.3.240.0070.01316.53
7.3.230.0100.00716.55
7.3.210.0080.01616.54
7.3.200.0110.01119.39
7.3.190.0100.00716.59
7.3.180.0060.00916.50
7.3.170.0100.00716.66
7.3.160.0160.00016.53
7.3.120.0030.01215.20
7.2.330.0160.00316.76
7.2.320.0100.01316.79
7.2.310.0070.01416.48
7.2.300.0130.00316.77
7.2.290.0080.00816.72
7.2.00.0000.01119.57
7.1.100.0000.01518.17
7.1.70.0040.00417.38
7.1.60.0210.00319.40
7.1.50.0100.01317.04
7.1.00.0000.07322.46
7.0.200.0000.01017.02
7.0.140.0100.06721.95
7.0.110.0070.04719.90
7.0.100.0100.07320.10
7.0.90.0000.04719.99
7.0.80.0030.05020.06
7.0.70.0170.03719.83
7.0.60.0030.04320.04
7.0.50.0030.06019.96
7.0.40.0030.04019.76
7.0.30.0030.03719.70
7.0.20.0100.03319.77
7.0.10.0030.08319.78
7.0.00.0070.06719.81
5.6.280.0000.07720.92
5.6.260.0070.04320.75
5.6.250.0100.04020.69
5.6.240.0070.07020.67
5.6.230.0130.03720.56
5.6.220.0070.04020.53
5.6.210.0030.04020.68
5.6.200.0100.03720.71
5.6.190.0000.04320.66
5.6.180.0100.04020.61
5.6.170.0030.03320.47
5.6.160.0030.04720.68
5.6.150.0030.04020.56
5.6.140.0070.03320.61
5.6.130.0070.04720.51
5.6.120.0000.04020.65
5.6.110.0030.06720.55
5.6.100.0030.04320.70
5.6.90.0070.04320.59
5.6.80.0100.04019.94
5.6.70.0070.03020.03
5.6.60.0000.05019.94
5.6.50.0030.04720.03
5.6.40.0100.07019.93
5.6.30.0070.06720.01
5.6.20.0070.05720.00
5.6.10.0000.03719.91
5.6.00.0070.03720.00
5.5.380.0000.04717.55
5.5.370.0130.07317.56
5.5.360.0030.04017.55
5.5.350.0030.05317.55
5.5.340.0000.04718.14
5.5.330.0100.06318.10
5.5.320.0030.04318.13
5.5.310.0100.05017.93
5.5.300.0070.06718.12
5.5.290.0030.04317.96
5.5.280.0030.03718.08
5.5.270.0100.03317.90
5.5.260.0100.07018.10
5.5.250.0070.05717.95
5.5.240.0130.06017.32
5.5.230.0000.04717.50
5.5.220.0030.03717.30
5.5.210.0100.06017.29
5.5.200.0030.04017.32
5.5.190.0070.07317.45
5.5.180.0130.03717.61
5.5.160.0070.07717.48
5.5.150.0070.03017.44
5.5.140.0030.04017.28
5.5.130.0030.03317.58
5.5.120.0100.03317.27
5.5.110.0030.03317.57
5.5.100.0030.03717.47
5.5.90.0070.03717.30
5.5.80.0000.04317.34
5.5.70.0030.07017.47
5.5.60.0070.04017.36
5.5.50.0000.04317.37
5.5.40.0000.04317.15
5.5.30.0030.04017.46
5.5.20.0100.06717.15
5.5.10.0070.05317.46
5.5.00.0100.06017.17
5.4.450.0130.03719.57
5.4.440.0000.05719.34
5.4.430.0100.05319.56
5.4.420.0030.04019.63
5.4.410.0000.05019.38
5.4.400.0070.03019.09
5.4.390.0100.08019.01
5.4.380.0070.03019.03
5.4.370.0030.06719.18
5.4.360.0000.07719.17
5.4.350.0100.05019.16
5.4.340.0100.04719.02
5.4.320.0030.07019.14
5.4.310.0000.04019.03
5.4.300.0000.04719.02
5.4.290.0000.04019.17
5.4.280.0130.04719.24
5.4.270.0070.03018.95
5.4.260.0070.04718.99
5.4.250.0100.04019.01
5.4.240.0030.04719.19
5.4.230.0070.04718.98
5.4.220.0070.04319.00
5.4.210.0030.04019.23
5.4.200.0030.07019.21
5.4.190.0000.04319.09
5.4.180.0100.06019.30
5.4.170.0030.08019.00
5.4.160.0000.07319.02
5.4.150.0070.04019.21
5.4.140.0030.07316.58
5.4.130.0200.03016.57
5.4.120.0070.04016.55
5.4.110.0030.04016.33
5.4.100.0000.04716.52
5.4.90.0070.03716.50
5.4.80.0100.03716.58
5.4.70.0030.03716.61
5.4.60.0100.03716.55
5.4.50.0000.04316.52
5.4.40.0070.04716.55
5.4.30.0070.04016.33
5.4.20.0030.06716.40
5.4.10.0100.03316.40
5.4.00.0030.04316.05
5.3.290.0030.05014.66
5.3.280.0000.04714.83
5.3.270.0100.06714.46
5.3.260.0030.05014.74
5.3.250.0070.03714.64
5.3.240.0130.05314.74
5.3.230.0130.03714.61
5.3.220.0030.07014.59
5.3.210.0170.03314.58
5.3.200.0030.05314.64
5.3.190.0070.06314.54
5.3.180.0030.03714.70
5.3.170.0100.06314.57
5.3.160.0170.05714.54
5.3.150.0030.05014.56
5.3.140.0000.07714.57
5.3.130.0000.04314.68
5.3.120.0000.04014.40
5.3.110.0070.04014.54
5.3.100.0070.08014.05
5.3.90.0000.04714.02
5.3.80.0100.04714.12
5.3.70.0030.04014.09
5.3.60.0030.07314.04
5.3.50.0100.05013.98
5.3.40.0000.04314.04
5.3.30.0030.05013.88
5.3.20.0030.03713.70
5.3.10.0030.03313.68
5.3.00.0070.07313.66
5.2.170.0000.03311.93
5.2.160.0030.02311.93
5.2.150.0030.03011.93
5.2.140.0000.04011.93
5.2.130.0000.04711.93
5.2.120.0100.02311.93
5.2.110.0000.03711.93
5.2.100.0000.03011.93
5.2.90.0000.03011.93
5.2.80.0070.02311.93
5.2.70.0030.06311.93
5.2.60.0030.02711.93
5.2.50.0100.04711.93
5.2.40.0000.03011.93
5.2.30.0030.06011.93
5.2.20.0000.05011.93
5.2.10.0000.03011.93
5.2.00.0030.05311.93
5.1.60.0000.04311.93
5.1.50.0030.05011.93
5.1.40.0030.02711.93
5.1.30.0030.04011.93
5.1.20.0070.03311.93
5.1.10.0000.03311.93
5.1.00.0070.04711.93
5.0.50.0000.03311.93
5.0.40.0000.02311.93
5.0.30.0000.03311.93
5.0.20.0000.02011.93
5.0.10.0000.02311.93
5.0.00.0170.02311.93
4.4.90.0030.01311.93
4.4.80.0000.01711.93
4.4.70.0030.01311.93
4.4.60.0000.02311.93
4.4.50.0000.03311.93
4.4.40.0000.03011.93
4.4.30.0030.01711.93
4.4.20.0000.03311.93
4.4.10.0030.03311.93
4.4.00.0000.03311.93
4.3.110.0000.01711.93
4.3.100.0000.01711.93
4.3.90.0000.01711.93
4.3.80.0000.03011.93
4.3.70.0070.01011.93
4.3.60.0030.01311.93
4.3.50.0000.01711.93
4.3.40.0000.02311.93
4.3.30.0030.01311.93
4.3.20.0030.01311.93
4.3.10.0000.01311.93
4.3.00.0000.01311.93

preferences:
46.12 ms | 401 KiB | 5 Q