3v4l.org

run code in 300+ PHP versions simultaneously
<?php function shorten($input, $length = 100, $end = '...') { if (mb_strlen($input) <= $length) { return $input; } return rtrim(mb_substr($input, 0, $length, 'UTF-8')) . $end; } print shorten('The quick brown fox jumped over the lazy dog', 15); // The quick brown...

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.0100.01018.31
8.3.60.0170.00018.43
8.3.50.0110.00418.32
8.3.40.0070.00718.84
8.3.30.0110.00418.68
8.3.20.0080.00022.28
8.3.10.0000.00720.32
8.3.00.0050.00322.64
8.2.190.0110.00718.41
8.2.180.0140.00418.05
8.2.170.0030.01022.96
8.2.160.0060.00822.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00719.64
8.2.110.0110.00720.52
8.2.100.0070.00417.72
8.2.90.0000.00817.84
8.2.80.0000.00819.02
8.2.70.0040.00417.50
8.2.60.0040.00417.38
8.2.50.0030.00517.80
8.2.40.0070.00018.04
8.2.30.0000.00719.07
8.2.20.0040.00417.88
8.2.10.0040.00419.13
8.2.00.0050.00519.00
8.1.280.0070.01125.92
8.1.270.0030.00622.44
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0000.01023.77
8.1.230.0080.00422.75
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0060.00317.22
8.1.180.0030.00618.10
8.1.170.0040.00417.62
8.1.160.0070.00018.73
8.1.150.0000.00718.74
8.1.140.0040.00420.83
8.1.130.0000.00720.14
8.1.120.0000.00917.33
8.1.110.0040.00417.43
8.1.100.0040.00417.37
8.1.90.0040.00417.41
8.1.80.0040.00417.36
8.1.70.0050.00217.25
8.1.60.0080.00017.53
8.1.50.0080.00017.55
8.1.40.0030.00517.47
8.1.30.0000.00817.63
8.1.20.0090.00017.62
8.1.10.0000.00717.51
8.1.00.0000.00817.48
8.0.300.0070.00020.05
8.0.290.0070.00016.75
8.0.280.0030.00318.44
8.0.270.0040.00416.76
8.0.260.0000.00720.07
8.0.250.0040.00416.92
8.0.240.0000.00716.98
8.0.230.0030.00316.84
8.0.220.0040.00416.88
8.0.210.0040.00416.80
8.0.200.0040.00416.85
8.0.190.0030.00316.82
8.0.180.0000.00816.77
8.0.170.0030.00516.83
8.0.160.0070.00016.94
8.0.150.0040.00316.89
8.0.140.0000.00716.84
8.0.130.0000.00613.41
8.0.120.0040.00416.85
8.0.110.0050.00316.85
8.0.100.0000.00816.84
8.0.90.0060.00316.77
8.0.80.0070.00716.81
8.0.70.0030.00516.78
8.0.60.0050.00316.88
8.0.50.0000.00816.82
8.0.30.0090.00917.27
8.0.20.0110.00717.13
8.0.10.0030.00616.89
8.0.00.0130.00616.66
7.4.330.0000.00615.55
7.4.320.0030.00316.55
7.4.300.0030.00316.54
7.4.290.0070.00016.47
7.4.280.0040.00416.51
7.4.270.0000.00716.59
7.4.260.0030.00313.27
7.4.250.0070.00016.42
7.4.240.0020.00616.46
7.4.230.0030.00316.52
7.4.220.0020.00516.43
7.4.210.0050.01316.43
7.4.200.0040.00416.33
7.4.130.0090.00916.36
7.4.120.0110.01216.55
7.4.110.0100.00916.35
7.4.100.0110.00716.24
7.4.90.0130.01016.35
7.4.80.0100.00719.39
7.4.70.0030.01316.29
7.4.60.0140.00816.48
7.4.50.0090.00616.28
7.4.40.0130.00316.38
7.4.10.0090.00914.88
7.4.00.0080.01014.71
7.3.330.0000.00816.31
7.3.320.0030.00313.16
7.3.310.0030.00316.34
7.3.300.0030.00316.30
7.3.290.0000.00716.17
7.3.280.0100.00716.24
7.3.260.0100.00816.50
7.3.240.0070.01116.41
7.3.230.0110.00616.58
7.3.210.0120.00616.35
7.3.200.0130.00316.68
7.3.190.0100.00716.46
7.3.180.0130.00316.45
7.3.170.0070.01016.25
7.3.160.0120.00616.45
7.3.130.0080.01114.78
7.3.120.0090.00914.79
7.3.110.0100.00714.74
7.3.100.0100.00714.76
7.3.90.0070.00614.75
7.3.80.0040.01114.94
7.3.70.0090.00514.67
7.3.60.0090.00514.79
7.3.50.0070.00714.87
7.3.40.0010.01214.90
7.3.30.0040.01114.82
7.3.20.0110.00516.04
7.3.10.0040.01115.98
7.3.00.0060.00716.06
7.2.330.0200.00316.71
7.2.320.0060.01616.39
7.2.310.0100.00716.34
7.2.300.0100.00716.68
7.2.290.0070.01016.73
7.2.260.0130.00315.04
7.2.250.0050.01015.10
7.2.240.0080.00915.04
7.2.230.0030.01014.97
7.2.220.0070.00714.93
7.2.210.0060.00714.82
7.2.200.0080.00914.97
7.2.190.0070.00814.96
7.2.180.0100.00414.76
7.2.170.0040.00915.04
7.2.160.0040.00815.00
7.2.150.0080.00616.20
7.2.140.0070.00816.21
7.2.130.0070.00816.29
7.2.120.0060.01416.13
7.2.110.0110.00716.18
7.2.100.0080.00816.20
7.2.90.0100.00516.35
7.2.80.0070.01016.19
7.2.70.0050.01216.19
7.2.60.0080.00616.29
7.2.50.0110.00716.02
7.2.40.0060.01216.26
7.2.30.0080.00816.28
7.2.20.0070.00916.13
7.2.10.0080.01016.20
7.2.00.0070.01116.10
7.1.330.0050.01015.80
7.1.320.0070.00815.29
7.1.310.0060.00615.23
7.1.300.0050.00615.31
7.1.290.0060.00815.16
7.1.280.0060.01015.04
7.1.270.0080.00615.05
7.1.260.0060.00915.13
7.1.250.0110.00514.97
7.1.240.0030.01015.68
7.1.230.0020.01315.61
7.1.220.0050.00915.79
7.1.210.0070.00915.82
7.1.200.0030.01115.83
7.1.190.0030.00715.82
7.1.180.0050.00615.71
7.1.170.0080.00515.86
7.1.160.0100.00515.84
7.1.150.0100.00215.72
7.1.140.0080.00615.78
7.1.130.0070.00715.81
7.1.120.0110.00315.90
7.1.110.0040.00915.96
7.1.100.0040.00915.73
7.1.90.0060.00815.76
7.1.80.0070.00815.87
7.1.70.0050.00915.76
7.1.60.0080.01015.70
7.1.50.0030.01115.74
7.1.40.0070.00815.95
7.1.30.0080.00615.88
7.1.20.0070.00815.81
7.1.10.0030.01115.62
7.1.00.0090.00915.92

preferences:
33.25 ms | 401 KiB | 5 Q