3v4l.org

run code in 300+ PHP versions simultaneously
<?php # numeric strings string_lt('22', '123'); string_lt('123', '22'); # non-numeric strings string_lt('bb', 'abc'); string_lt('abc', 'bb'); function string_lt($str1, $str2) { # you can't use < operator for comparing strings # wacky stuff will happen $lt_says = ((string) $str1 < (string) $str2); # see what strcmp() says $strcmp_says = strcmp($str1, $str2); echo "$str1 less than $str2; lt_says: $lt_says, strcmp_says: $strcmp_says\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.0040.01118.43
8.3.50.0070.01022.85
8.3.40.0070.00718.42
8.3.30.0070.00719.09
8.3.20.0080.00020.31
8.3.10.0050.00323.64
8.3.00.0080.00019.26
8.2.180.0060.01818.41
8.2.170.0100.00722.96
8.2.160.0060.00820.56
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0150.00019.08
8.2.110.0070.00322.29
8.2.100.0040.00718.22
8.2.90.0100.00019.14
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0050.00318.05
8.2.50.0050.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.00
8.2.20.0070.00017.68
8.2.10.0030.00518.05
8.2.00.0000.00917.67
8.1.280.0100.01025.92
8.1.270.0080.00023.95
8.1.260.0050.00226.35
8.1.250.0050.00228.09
8.1.240.0060.00321.92
8.1.230.0090.00319.18
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0090.00017.22
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0000.00918.68
8.1.160.0050.00222.02
8.1.150.0000.00718.90
8.1.140.0070.00017.43
8.1.130.0030.00317.83
8.1.120.0050.00317.47
8.1.110.0040.00417.52
8.1.100.0040.00417.37
8.1.90.0000.00817.50
8.1.80.0030.00317.45
8.1.70.0000.00717.41
8.1.60.0080.00017.53
8.1.50.0000.00817.40
8.1.40.0040.00417.39
8.1.30.0000.00817.58
8.1.20.0000.00717.62
8.1.10.0040.00417.56
8.1.00.0080.00017.31
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00818.36
8.0.270.0040.00417.18
8.0.260.0060.00017.27
8.0.250.0000.00616.85
8.0.240.0040.00416.98
8.0.230.0070.00016.82
8.0.220.0000.00716.96
8.0.210.0000.00716.86
8.0.200.0000.00616.86
8.0.190.0070.00016.87
8.0.180.0030.00316.81
8.0.170.0050.00316.95
8.0.160.0070.00017.00
8.0.150.0000.00716.88
8.0.140.0000.00816.71
8.0.130.0030.00313.32
8.0.120.0000.00816.83
8.0.110.0070.00016.88
8.0.100.0040.00416.75
8.0.90.0050.00316.96
8.0.80.0080.00816.90
8.0.70.0070.00016.89
8.0.60.0040.00416.75
8.0.50.0070.00016.74
8.0.30.0150.00917.07
8.0.20.0100.00917.40
8.0.10.0040.00417.05
8.0.00.0070.01016.58
7.4.330.0000.00615.14
7.4.320.0000.00616.64
7.4.300.0030.00316.66
7.4.290.0000.00716.53
7.4.280.0030.00416.48
7.4.270.0070.00016.66
7.4.260.0040.00416.47
7.4.250.0000.00716.59
7.4.240.0000.00816.62
7.4.230.0030.00316.72
7.4.220.0090.00916.57
7.4.210.0030.01016.47
7.4.200.0000.00716.54
7.4.160.0040.01216.58
7.4.150.0100.01017.40
7.4.140.0070.01017.86
7.4.130.0030.01416.52
7.4.120.0080.00816.62
7.4.110.0200.00316.71
7.4.100.0040.01316.50
7.4.90.0140.00316.54
7.4.80.0030.01719.39
7.4.70.0070.01316.41
7.4.60.0080.00916.40
7.4.50.0020.01216.25
7.4.40.0080.00815.90
7.4.30.0030.01416.13
7.4.20.0060.01016.25
7.4.10.0140.00416.03
7.4.00.0130.00315.98
7.3.330.0000.00513.39
7.3.320.0030.00313.22
7.3.310.0030.00316.40
7.3.300.0070.00016.34
7.3.290.0100.00316.33
7.3.280.0070.01016.36
7.3.270.0060.01317.40
7.3.260.0090.00916.56
7.3.250.0110.00916.53
7.3.240.0030.01316.39
7.3.230.0100.00616.42
7.3.210.0110.00816.47
7.3.200.0120.00519.39
7.3.190.0080.01216.45
7.3.180.0110.00516.50
7.3.170.0110.00516.21
7.3.160.0090.00616.24
7.3.150.0100.00716.35
7.3.140.0120.00416.41
7.3.130.0130.00316.35
7.3.120.0120.00616.32
7.3.110.0110.00316.29
7.3.100.0000.01616.43
7.3.90.0080.00816.23
7.3.80.0070.00916.34
7.3.70.0100.00716.38
7.3.60.0050.01116.35
7.3.50.0060.01216.16
7.3.40.0160.00416.44
7.3.30.0110.00616.13
7.3.20.0210.00415.93
7.3.10.0100.01316.06
7.3.00.0090.00616.39
7.2.330.0190.00016.76
7.2.320.0060.01116.42
7.2.310.0170.00016.12
7.2.300.0080.00816.45
7.2.290.0060.01116.20
7.2.280.0060.01216.43
7.2.270.0090.00916.36
7.2.260.0160.00316.23
7.2.250.0050.01216.43
7.2.240.0050.01116.39
7.2.230.0100.00616.28
7.2.220.0090.00616.30
7.2.210.0070.01016.27
7.2.200.0130.00316.30
7.2.190.0080.00816.39
7.2.180.0180.00016.33
7.2.170.0150.00616.23
7.2.160.0110.00516.34
7.2.150.0170.00416.34
7.2.140.0110.01116.32
7.2.130.0030.01616.54
7.2.120.0100.00716.40
7.2.110.0100.00616.34
7.2.100.0120.00916.35
7.2.90.0100.01016.51
7.2.80.0060.00816.43
7.2.70.0030.02016.31
7.2.60.0090.01216.75
7.2.50.0130.00516.38
7.2.40.0100.00716.38
7.2.30.0030.01616.31
7.2.20.0100.01016.41
7.2.10.0060.01016.29
7.2.00.0090.00916.35
7.1.330.0100.00615.51
7.1.320.0090.00715.36
7.1.310.0060.00915.20
7.1.300.0100.00515.44
7.1.290.0190.00015.39
7.1.280.0150.00715.38
7.1.270.0100.00715.41
7.1.260.0160.00315.45
7.1.250.0060.00915.34
7.1.240.0070.01115.48
7.1.230.0090.00615.46
7.1.220.0090.00615.21
7.1.210.0110.00515.21
7.1.200.0050.00815.50
7.1.190.0130.00815.30
7.1.180.0100.00715.26
7.1.170.0180.00315.20
7.1.160.0110.00815.29
7.1.150.0090.01215.40
7.1.140.0080.00815.36
7.1.130.0110.00415.22
7.1.120.0060.00915.25
7.1.110.0070.01015.37
7.1.100.0110.00516.85
7.1.90.0090.00615.04
7.1.80.0130.00615.30
7.1.70.0110.00116.30
7.1.60.0050.01417.37
7.1.50.0080.01016.22
7.1.40.0120.00815.37
7.1.30.0120.00415.41
7.1.20.0030.01615.46
7.1.10.0070.01015.19
7.1.00.0110.03618.81
7.0.330.0080.00815.03
7.0.320.0260.01115.01
7.0.310.0080.00814.94
7.0.300.0070.00714.84
7.0.290.0090.00915.10
7.0.280.0120.00615.12
7.0.270.0110.00414.98
7.0.260.0100.00514.97
7.0.250.0120.00414.95
7.0.240.0100.00714.94
7.0.230.0130.00314.82
7.0.220.0050.01015.05
7.0.210.0070.00714.96
7.0.200.0050.00715.86
7.0.190.0060.00915.06
7.0.180.0100.00515.24
7.0.170.0060.00915.30
7.0.160.0100.00715.01
7.0.150.0130.00715.12
7.0.140.0070.03918.58
7.0.130.0100.00714.97
7.0.120.0130.00315.06
7.0.110.0070.01014.89
7.0.100.0160.00414.86
7.0.90.0120.00615.04
7.0.80.0040.01214.89
7.0.70.0030.01714.98
7.0.60.0100.03917.64
7.0.50.0050.04816.46
7.0.40.0130.03817.52
7.0.30.0240.03817.61
7.0.20.0120.02517.60
7.0.10.0100.03217.57
7.0.00.0100.04717.62
5.6.400.0130.00815.84
5.6.390.0040.01815.57
5.6.380.0090.00915.75
5.6.370.0160.00715.43
5.6.360.0030.01415.56
5.6.350.0130.01015.55
5.6.340.0100.01015.68
5.6.330.0040.01315.68
5.6.320.0110.00715.74
5.6.310.0120.00616.00
5.6.300.0060.01215.82
5.6.290.0160.00315.85
5.6.280.0030.04318.48
5.6.270.0110.00815.57
5.6.260.0100.00915.67
5.6.250.0120.00615.62
5.6.240.0080.01115.52
5.6.230.0130.00815.77
5.6.220.0130.01015.65
5.6.210.0120.03218.16
5.6.200.0080.03216.91
5.6.190.0080.04917.99
5.6.180.0240.03518.13
5.6.170.0170.04018.01
5.6.160.0100.02518.10
5.6.150.0070.02516.86
5.6.140.0050.04916.93
5.6.130.0020.04916.77
5.6.120.0050.02918.39
5.6.110.0080.04518.24
5.6.100.0080.04518.35
5.6.90.0080.02318.44
5.6.80.0090.02218.00
5.6.70.0140.00315.63
5.6.60.0110.00615.59
5.6.50.0120.00815.62
5.6.40.0170.00015.53
5.6.30.0090.00815.31
5.6.20.0040.01415.62
5.6.10.0100.00715.59
5.6.00.0130.00415.55
5.5.380.0170.00815.50
5.5.370.0100.01315.59
5.5.360.0080.01415.47
5.5.350.0050.02717.94
5.5.340.0050.05016.82
5.5.330.0100.03318.13
5.5.320.0000.02917.95
5.5.310.0200.04717.93
5.5.300.0100.04216.78
5.5.290.0080.04616.63
5.5.280.0070.04718.18
5.5.270.0130.02618.30
5.5.260.0090.04618.21
5.5.250.0090.03418.05
5.5.240.0050.04717.92
5.5.230.0140.00315.67
5.5.220.0110.00615.72
5.5.210.0090.00915.60
5.5.200.0100.00715.59
5.5.190.0120.00615.55
5.5.180.0090.00915.46
5.5.170.0060.01315.37
5.5.160.0070.01015.50
5.5.150.0040.01315.55
5.5.140.0060.01015.43
5.5.130.0120.00615.55
5.5.120.0100.00715.68
5.5.110.0000.01715.46
5.5.100.0090.00915.65
5.5.90.0060.01115.75
5.5.80.0070.01015.65
5.5.70.0060.01215.27
5.5.60.0110.00715.47
5.5.50.0000.01715.73
5.5.40.0060.01615.64
5.5.30.0090.01215.26
5.5.20.0080.01115.45
5.5.10.0130.00615.72
5.5.00.0110.00715.52
5.4.450.0370.03015.86
5.4.440.0430.03516.14
5.4.430.0360.03316.11
5.4.420.0600.02815.96
5.4.410.0420.03215.94
5.4.400.0530.03215.74
5.4.390.0500.03015.76
5.4.380.0150.03415.70
5.4.370.0280.03315.71
5.4.360.0230.04015.47
5.4.350.0250.03215.48
5.4.340.0320.03715.61
5.4.330.0040.00912.38
5.4.320.0090.01812.48
5.4.310.0070.01912.57
5.4.300.0090.01812.59
5.4.290.0060.02312.46
5.4.280.0080.01912.38
5.4.270.0050.02212.44
5.4.260.0080.02112.47
5.4.250.0070.02112.50
5.4.240.0070.02012.42
5.4.230.0060.02112.39
5.4.220.0070.02012.48
5.4.210.0050.02212.38
5.4.200.0060.02312.44
5.4.190.0050.02112.37
5.4.180.0080.01812.60
5.4.170.0080.02412.43
5.4.160.0060.02112.54
5.4.150.0070.02212.46
5.4.140.0080.02012.31
5.4.130.0070.01912.31
5.4.120.0070.02012.27
5.4.110.0060.02012.33
5.4.100.0060.02312.28
5.4.90.0070.02012.31
5.4.80.0070.02412.40
5.4.70.0090.01812.34
5.4.60.0070.02012.31
5.4.50.0060.02212.30
5.4.40.0060.02012.31
5.4.30.0060.02212.30
5.4.20.0090.01812.26
5.4.10.0040.02312.27
5.4.00.0050.02111.99
5.3.290.0060.02413.02
5.3.280.0060.02312.91
5.3.270.0090.02012.94
5.3.260.0060.02312.87
5.3.250.0090.02113.02
5.3.240.0060.02312.88
5.3.230.0080.02012.83
5.3.220.0040.03012.78
5.3.210.0080.02312.76
5.3.200.0040.02512.77
5.3.190.0040.02512.78
5.3.180.0060.02412.86
5.3.170.0060.02612.88
5.3.160.0050.02412.86
5.3.150.0040.02612.92
5.3.140.0060.02412.83
5.3.130.0060.02312.82
5.3.120.0030.02512.88
5.3.110.0080.02512.81
5.3.100.0060.02212.69
5.3.90.0080.02012.56
5.3.80.0050.02212.64
5.3.70.0100.01712.56
5.3.60.0050.02212.60
5.3.50.0040.02312.55
5.3.40.0050.02312.53
5.3.30.0050.02212.57
5.3.20.0080.01912.44
5.3.10.0060.02112.31
5.3.00.0040.02312.33
5.2.170.0050.01810.64
5.2.160.0050.01810.67
5.2.150.0070.01710.63
5.2.140.0020.02310.66
5.2.130.0050.01710.61
5.2.120.0030.02010.58
5.2.110.0030.01910.58
5.2.100.0120.01110.60
5.2.90.0070.01610.55
5.2.80.0060.01910.58
5.2.70.0100.02010.53
5.2.60.0040.02010.43
5.2.50.0060.01810.48
5.2.40.0070.01710.53
5.2.30.0070.01810.45
5.2.20.0030.02010.40
5.2.10.0040.01910.39
5.2.00.0050.01810.20
5.1.60.0030.0179.52
5.1.50.0050.0229.60
5.1.40.0060.0199.64
5.1.30.0060.0189.81
5.1.20.0040.0179.80
5.1.10.0050.0159.58
5.1.00.0040.0169.52
5.0.50.0050.0128.39
5.0.40.0080.0098.32
5.0.30.0070.0158.23
5.0.20.0060.0108.21
5.0.10.0020.0148.20
5.0.00.0040.0188.20
4.4.90.0030.0107.46
4.4.80.0030.0107.45
4.4.70.0040.0097.45
4.4.60.0040.0077.45
4.4.50.0040.0077.46
4.4.40.0050.0167.42
4.4.30.0060.0107.45
4.4.20.0030.0107.49
4.4.10.0040.0087.50
4.4.00.0030.0157.45
4.3.110.0050.0097.40
4.3.100.0030.0097.40
4.3.90.0030.0097.39
4.3.80.0040.0147.36
4.3.70.0010.0117.39
4.3.60.0030.0087.38
4.3.50.0000.0127.38
4.3.40.0030.0127.34
4.3.30.0040.0086.72
4.3.20.0040.0086.71
4.3.10.0020.0096.70
4.3.00.0040.0138.85

preferences:
40.06 ms | 401 KiB | 5 Q