3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://gathering.tweakers.net/forum/list_message/41881215#41881215 function foo($string1, $string2) { /* Retourneert true dan en slechts dan wanneer de twee argumenten strings zijn en het eerste argument lexicografisch kleiner is. */ return stcmp($string1, $string2); return is_string($string1) && is_string($string2) && $string1 < $string2; } var_dump( foo(1,2), foo('1','2'), foo('a','b'), foo('b','a'), foo('ab','ab'), foo('abc','ab'), foo('2xx','2yy') );

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.40.0070.00718.84
8.3.30.0030.01020.29
8.3.20.0070.00020.21
8.3.10.0050.00322.13
8.3.00.0050.00322.39
8.2.170.0170.00322.96
8.2.160.0030.01022.12
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00820.74
8.2.110.0060.00322.07
8.2.100.0070.00417.78
8.2.90.0000.00919.08
8.2.80.0040.00419.41
8.2.70.0040.00717.63
8.2.60.0050.00317.90
8.2.50.0060.00318.07
8.2.40.0000.00718.05
8.2.30.0000.00719.34
8.2.20.0030.00517.70
8.2.10.0000.00717.77
8.2.00.0040.00417.70
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.96
8.1.230.0040.00718.97
8.1.220.0050.00317.76
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0030.00517.53
8.1.180.0000.00819.01
8.1.170.0070.00418.46
8.1.160.0000.00718.83
8.1.150.0060.00318.61
8.1.140.0040.00417.35
8.1.130.0000.00717.79
8.1.120.0070.00017.38
8.1.110.0030.00617.33
8.1.100.0030.00617.26
8.1.90.0000.00717.24
8.1.80.0050.00317.39
8.1.70.0030.00317.25
8.1.60.0040.00417.63
8.1.50.0080.00017.37
8.1.40.0040.00417.36
8.1.30.0000.00717.48
8.1.20.0030.00517.67
8.1.10.0040.00417.52
8.1.00.0080.00317.48
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0030.00318.28
8.0.270.0040.00417.13
8.0.260.0070.00016.76
8.0.250.0040.00416.86
8.0.240.0000.00816.96
8.0.230.0000.00716.98
8.0.220.0000.00716.92
8.0.210.0070.00016.89
8.0.200.0000.00617.02
8.0.190.0030.00317.00
8.0.180.0000.00716.95
8.0.170.0020.00516.96
8.0.160.0000.00716.93
8.0.150.0000.00716.78
8.0.140.0030.00616.77
8.0.130.0000.00513.33
8.0.120.0040.00416.90
8.0.110.0060.00316.84
8.0.100.0040.00416.93
8.0.90.0030.00516.81
8.0.80.0030.01516.90
8.0.70.0080.00016.79
8.0.60.0070.00016.91
8.0.50.0040.00416.74
8.0.30.0100.01117.13
8.0.20.0110.00817.40
8.0.10.0050.00316.89
8.0.00.0100.01016.74
7.4.330.0050.00015.00
7.4.320.0030.00316.48
7.4.300.0060.00016.36
7.4.290.0000.00716.53
7.4.280.0000.00816.44
7.4.270.0000.00716.39
7.4.260.0000.00513.23
7.4.250.0070.00016.59
7.4.240.0030.00316.39
7.4.230.0070.00016.30
7.4.220.0060.01016.63
7.4.210.0080.00816.51
7.4.200.0040.00416.59
7.4.190.0000.00716.45
7.4.160.0040.01816.54
7.4.150.0030.01417.40
7.4.140.0120.00717.86
7.4.130.0100.00616.48
7.4.120.0080.01116.54
7.4.110.0070.01016.55
7.4.100.0030.01616.44
7.4.90.0150.00316.34
7.4.80.0070.01119.39
7.4.70.0060.01216.68
7.4.60.0140.00716.46
7.4.50.0040.00416.63
7.4.40.0070.01022.77
7.4.30.0120.00616.37
7.4.00.0050.00514.77
7.3.330.0050.00013.26
7.3.320.0030.00313.12
7.3.310.0030.00316.38
7.3.300.0030.00316.32
7.3.290.0040.01116.23
7.3.280.0110.00716.35
7.3.270.0130.00317.40
7.3.260.0100.00716.45
7.3.250.0110.00916.33
7.3.240.0040.01216.29
7.3.230.0060.01016.39
7.3.210.0060.01616.46
7.3.200.0140.00419.39
7.3.190.0060.01316.62
7.3.180.0100.00616.61
7.3.170.0070.01116.38
7.3.160.0060.01016.38
7.3.120.0070.01014.75
7.2.330.0060.01216.52
7.2.320.0040.01416.52
7.2.310.0130.00916.47
7.2.300.0090.01216.53
7.2.290.0070.01316.19
7.2.60.0000.01116.87
7.1.200.0000.01215.68
7.1.70.0030.00317.16
7.1.60.0100.01619.32
7.1.50.0090.01516.48
7.1.00.0100.06722.31
7.0.200.0030.01216.73
7.0.140.0030.07322.18
7.0.100.0070.04720.06
7.0.90.0070.08719.98
7.0.80.0070.09019.89
7.0.70.0130.07319.90
7.0.60.0430.07719.96
7.0.50.0100.08020.25
7.0.40.0000.05320.13
7.0.30.0100.07720.05
7.0.20.0100.08320.18
7.0.10.0100.06720.14
7.0.00.0030.07720.16
5.6.280.0070.07320.86
5.6.250.0100.05320.78
5.6.240.0070.07020.58
5.6.230.0070.07320.63
5.6.220.0100.04720.57
5.6.210.0100.07020.46
5.6.200.0070.07021.18
5.6.190.0070.06020.95
5.6.180.0070.06020.96
5.6.170.0100.06320.96
5.6.160.0030.08721.06
5.6.150.0100.07721.02
5.6.140.0130.05321.01
5.6.130.0100.07321.05
5.6.120.0100.04321.10
5.6.110.0000.05321.16
5.6.100.0100.08720.93
5.6.90.0170.08321.06
5.6.80.0030.05720.40
5.6.70.0100.04020.40
5.6.60.0030.07320.30
5.6.50.0100.04720.39
5.6.40.0130.07020.40
5.6.30.0130.07020.54
5.6.20.0300.06020.50
5.6.10.0100.05020.49
5.6.00.0100.04320.38
5.5.380.0170.07720.46
5.5.370.0100.05720.45
5.5.360.0100.07020.44
5.5.350.0070.08320.44
5.5.340.0100.07020.82
5.5.330.0070.07020.92
5.5.320.0100.05020.83
5.5.310.0000.08720.76
5.5.300.0100.08020.91
5.5.290.0000.07720.92
5.5.280.0030.05720.77
5.5.270.0030.07320.91
5.5.260.0130.08720.64
5.5.250.0100.07020.66
5.5.240.0030.08020.12
5.5.230.0070.08720.25
5.5.220.0070.07320.21
5.5.210.0070.07320.20
5.5.200.0070.05020.24
5.5.190.0100.08320.27
5.5.180.0070.07720.11
5.5.160.0070.08020.21
5.5.150.0070.07720.28
5.5.140.0100.07320.08
5.5.130.0030.06320.27
5.5.120.0000.06720.27
5.5.110.0000.09019.99
5.5.100.0100.08320.12
5.5.90.0070.07720.09
5.5.80.0100.04320.17
5.5.70.0070.04720.00
5.5.60.0170.06020.16
5.5.50.0130.07020.16
5.5.40.0100.07319.93
5.5.30.0130.06720.08
5.5.20.0070.08020.15
5.5.10.0030.07720.07
5.5.00.0130.07020.02
5.4.450.0000.06319.36
5.4.440.0200.05719.41
5.4.430.0100.07019.35
5.4.420.0100.04719.44
5.4.410.0130.07019.29
5.4.400.0000.08319.13
5.4.390.0130.07019.21
5.4.380.0030.04319.18
5.4.370.0070.07719.04
5.4.360.0130.05018.90
5.4.350.0070.04319.16
5.4.340.0100.04319.03
5.4.320.0030.08019.12
5.4.310.0070.07019.03
5.4.300.0100.07018.88
5.4.290.0070.07318.90
5.4.280.0100.07319.03
5.4.270.0000.06719.23
5.4.260.0130.06019.18
5.4.250.0070.06018.84
5.4.240.0030.07319.22
5.4.230.0130.07019.05
5.4.220.0070.06719.13
5.4.210.0000.05319.22
5.4.200.0100.07019.12
5.4.190.0070.08019.03
5.4.180.0170.05718.93
5.4.170.0200.06319.04
5.4.160.0000.05719.16
5.4.150.0170.06718.93
5.4.140.0170.06316.45
5.4.130.0070.03716.33
5.4.120.0030.04016.41
5.4.110.0070.05716.43
5.4.100.0070.06016.47
5.4.90.0070.04716.39
5.4.80.0070.07016.55
5.4.70.0070.05016.37
5.4.60.0070.06716.43
5.4.50.0030.07316.44
5.4.40.0070.06016.50
5.4.30.0000.07716.40
5.4.20.0070.06716.39
5.4.10.0130.05016.48
5.4.00.0030.05015.90
5.3.290.0000.06714.68
5.3.280.0000.08314.74
5.3.270.0030.04714.54
5.3.260.0130.07314.73
5.3.250.0100.07014.56
5.3.240.0000.05014.59
5.3.230.0000.05014.59
5.3.220.0100.06314.69
5.3.210.0130.04014.55
5.3.200.0030.05014.64
5.3.190.0030.03714.54
5.3.180.0070.07014.62
5.3.170.0070.07314.49
5.3.160.0000.04714.63
5.3.150.0030.03714.62
5.3.140.0070.07714.48
5.3.130.0000.05014.64
5.3.120.0030.03714.60
5.3.110.0100.06714.57
5.3.100.0130.06314.13
5.3.90.0030.06314.01
5.3.80.0030.04314.00
5.3.70.0100.07014.02
5.3.60.0030.07714.14
5.3.50.0030.07713.84
5.3.40.0130.06313.94
5.3.30.0100.04013.92
5.3.20.0100.07313.83
5.3.10.0170.06313.79
5.3.00.0100.07013.54
5.2.170.0100.04711.20
5.2.160.0070.06011.03
5.2.150.0030.05311.21
5.2.140.0130.05311.21
5.2.130.0070.03711.15
5.2.120.0070.03011.21
5.2.110.0030.03311.23
5.2.100.0070.06011.18
5.2.90.0070.03011.21
5.2.80.0100.05711.02
5.2.70.0000.07011.09
5.2.60.0070.04710.96
5.2.50.0200.05011.13
5.2.40.0130.05710.98
5.2.30.0100.05710.88
5.2.20.0170.04711.10
5.2.10.0100.05310.93
5.2.00.0030.03010.77
5.1.60.0000.04010.00
5.1.50.0100.0279.98
5.1.40.0000.0309.82
5.1.30.0030.05310.24
5.1.20.0030.03010.42
5.1.10.0030.05310.16
5.1.00.0030.04310.15
5.0.50.0030.0479.54
5.0.40.0030.0379.54
5.0.30.0070.0579.54
5.0.20.0030.0339.54
5.0.10.0030.0439.54
5.0.00.0030.0609.54
4.4.90.0030.0239.54
4.4.80.0000.0379.54
4.4.70.0000.0209.54
4.4.60.0030.0339.54
4.4.50.0000.0209.54
4.4.40.0030.0439.54
4.4.30.0000.0239.54
4.4.20.0070.0339.54
4.4.10.0000.0339.54
4.4.00.0000.0579.54
4.3.110.0030.0339.54
4.3.100.0030.0379.54
4.3.90.0070.0239.54
4.3.80.0000.0539.54
4.3.70.0000.0309.54
4.3.60.0030.0309.54
4.3.50.0000.0309.54
4.3.40.0000.0409.54
4.3.30.0070.0309.54
4.3.20.0000.0239.54
4.3.10.0000.0309.54
4.3.00.0030.0139.54

preferences:
45.24 ms | 400 KiB | 5 Q