3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Validator { /** * Alleen decimale cijfers * * @param mixed $var * @return bool */ public static function onlyDigits($var) { return ctype_digit($var); } } // Tests var_dump( Validator::onlyDigits('abc') ); // Moet FALSE zijn var_dump( Validator::onlyDigits('123') ); // Moet TRUE zijn

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.4.10.0080.00517.31
8.3.140.0110.00716.69
8.3.130.0080.00016.70
8.3.120.0050.00519.04
8.3.110.0000.00820.94
8.3.100.0000.01024.06
8.3.90.0040.00426.77
8.3.80.0110.00020.24
8.3.70.0040.01516.50
8.3.60.0120.00916.34
8.3.50.0070.01121.08
8.3.40.0060.00918.45
8.3.30.0150.00318.45
8.3.20.0040.00420.40
8.3.10.0040.00421.90
8.3.00.0090.00023.38
8.2.250.0040.01216.59
8.2.240.0090.00019.02
8.2.230.0100.00722.58
8.2.220.0030.00637.54
8.2.210.0110.00426.77
8.2.200.0040.01116.75
8.2.190.0110.00718.14
8.2.180.0140.00718.16
8.2.170.0170.00022.96
8.2.160.0070.00720.49
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00421.04
8.2.120.0000.00726.35
8.2.110.0090.00319.39
8.2.100.0030.01017.78
8.2.90.0000.00919.35
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0040.00422.34
8.2.30.0040.00419.24
8.2.20.0040.00417.56
8.2.10.0080.00017.80
8.2.00.0000.00717.84
8.1.300.0000.00915.83
8.1.290.0000.00918.88
8.1.280.0180.00425.92
8.1.270.0040.00422.03
8.1.260.0080.00028.09
8.1.250.0000.00828.09
8.1.240.0090.00020.94
8.1.230.0090.00320.88
8.1.220.0080.00017.74
8.1.210.0080.00318.77
8.1.200.0060.00317.22
8.1.190.0000.00817.11
8.1.180.0080.00018.10
8.1.170.0000.00818.47
8.1.160.0000.00720.63
8.1.150.0040.00418.75
8.1.140.0040.00419.48
8.1.130.0030.00317.58
8.1.120.0040.00417.29
8.1.110.0020.00517.29
8.1.100.0000.00817.21
8.1.90.0040.00417.36
8.1.80.0070.00017.23
8.1.70.0000.00717.23
8.1.60.0000.00817.52
8.1.50.0040.00417.42
8.1.40.0030.00717.48
8.1.30.0070.00317.54
8.1.20.0040.00417.55
8.1.10.0030.00617.33
8.1.00.0040.00417.20
8.0.300.0000.00719.71
8.0.290.0000.00716.63
8.0.280.0030.00318.37
8.0.270.0070.00017.16
8.0.260.0030.00317.11
8.0.250.0000.00816.88
8.0.240.0090.00016.78
8.0.230.0030.00316.81
8.0.220.0030.00516.71
8.0.210.0020.00516.79
8.0.200.0000.00616.83
8.0.190.0080.00016.88
8.0.180.0000.00816.80
8.0.170.0050.00216.80
8.0.160.0070.00016.79
8.0.150.0080.00016.61
8.0.140.0050.00316.71
8.0.130.0030.00313.14
8.0.120.0040.00416.78
8.0.110.0050.00316.77
8.0.100.0050.00216.84
8.0.90.0040.00416.64
8.0.80.0140.00616.73
8.0.70.0000.00716.62
8.0.60.0000.00816.67
8.0.50.0080.00016.64
8.0.30.0100.00916.82
8.0.20.0110.00817.40
8.0.10.0000.00716.71
8.0.00.0140.00516.77
7.4.330.0000.00516.89
7.4.320.0000.00616.51
7.4.300.0030.00316.41
7.4.290.0050.00216.43
7.4.280.0090.00016.42
7.4.270.0000.00716.36
7.4.260.0000.00716.38
7.4.250.0000.00816.44
7.4.240.0030.00316.49
7.4.230.0030.00316.60
7.4.220.0140.00416.41
7.4.210.0100.01016.51
7.4.200.0000.00816.31
7.4.160.0060.01016.39
7.4.150.0180.00017.40
7.4.140.0140.00617.86
7.4.130.0120.00616.48
7.4.120.0100.01016.42
7.4.110.0070.01016.57
7.4.100.0090.00816.40
7.4.90.0070.01116.57
7.4.80.0090.01819.39
7.4.70.0070.01016.34
7.4.60.0090.00916.29
7.4.50.0000.01616.40
7.4.40.0090.01316.43
7.4.30.0070.01016.23
7.4.00.0090.00814.82
7.3.330.0020.00213.22
7.3.320.0030.00313.27
7.3.310.0000.00816.20
7.3.300.0000.00716.25
7.3.290.0040.01216.25
7.3.280.0120.00616.22
7.3.270.0110.00617.40
7.3.260.0140.00416.50
7.3.240.0080.01016.37
7.3.230.0030.01316.39
7.3.210.0000.01516.24
7.3.200.0060.01119.39
7.3.190.0120.00916.54
7.3.180.0030.01316.27
7.3.170.0090.00916.50
7.3.160.0100.00716.45
7.3.120.0140.00314.74
7.3.110.0060.01114.60
7.3.100.0080.01114.77
7.3.90.0000.01414.59
7.3.80.0070.00714.84
7.3.70.0000.01414.69
7.3.60.0030.01014.66
7.3.50.0000.01414.57
7.3.40.0060.00614.77
7.3.30.0100.00314.72
7.3.20.0030.00716.20
7.3.10.0030.01016.71
7.3.00.0100.00716.36
7.2.330.0040.01716.26
7.2.320.0030.01316.49
7.2.310.0210.00316.50
7.2.300.0030.01316.53
7.2.290.0110.00616.25
7.2.250.0070.01114.65
7.2.240.0100.01015.05
7.2.230.0080.00814.70
7.2.220.0100.00315.02
7.2.210.0060.00914.75
7.2.200.0030.01014.80
7.2.190.0000.01314.84
7.2.180.0030.00614.99
7.2.170.0030.01014.75
7.2.80.0120.00016.52
7.2.60.0100.00316.51
7.1.330.0070.00715.70
7.1.320.0000.00915.93
7.1.310.0000.01416.00
7.1.300.0030.01015.75
7.1.290.0060.00615.57
7.1.280.0070.00715.75
7.1.270.0120.00315.66
7.1.260.0070.00715.68
7.1.200.0030.00615.72
7.1.70.0030.00516.87
7.1.60.0060.01619.28
7.1.50.0160.01316.58
7.1.00.0030.07722.38
7.0.200.0070.00316.58
7.0.60.0070.07021.81
7.0.50.0030.04317.85
7.0.40.0130.08020.02
7.0.30.0570.06320.06
7.0.20.0200.06020.33
7.0.10.0000.09320.23
7.0.00.0030.06320.22
5.6.280.0030.06720.82
5.6.210.0100.07020.71
5.6.200.0030.08318.28
5.6.190.0070.04020.61
5.6.180.0400.04020.47
5.6.170.0330.07320.42
5.6.160.0100.06320.47
5.6.150.0070.05018.24
5.6.140.0030.08018.13
5.6.130.0030.08018.15
5.6.120.0100.08021.12
5.6.110.0030.08320.98
5.6.100.0100.06021.04
5.6.90.0070.09021.11
5.6.80.0030.04020.41
5.5.350.3170.02720.41
5.5.340.0030.05718.02
5.5.330.0000.04320.46
5.5.320.0670.06320.29
5.5.310.0230.04020.26
5.5.300.0130.04017.92
5.5.290.0130.05317.95
5.5.280.0100.08020.76
5.5.270.0000.09320.76
5.5.260.0170.03320.80
5.5.250.0070.07720.71
5.5.240.0030.05020.18

preferences:
25.07 ms | 403 KiB | 5 Q