3v4l.org

run code in 300+ PHP versions simultaneously
<?php $postText = "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy."; $ellipsis = "...<a class='see-more' href='http://example.com/seemore-link'>read more</a>"; if (($len = strlen($postText)) > 170 && ($pos = strpos($postText, ' ', 170)) && ++$pos < $len){ $postText = substr_replace($postText, $ellipsis, $pos); } echo $postText;

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.120.0060.00520.79
8.4.110.0120.00819.46
8.4.100.0100.01118.89
8.4.90.0130.00620.58
8.4.80.0120.00820.49
8.4.70.0110.00918.00
8.4.60.0110.00918.88
8.4.50.0090.01018.62
8.4.40.0120.00917.73
8.4.30.0130.00719.41
8.4.20.0060.01319.47
8.4.10.0060.00317.56
8.3.250.0110.00819.12
8.3.240.0160.00318.78
8.3.230.0120.00916.68
8.3.220.0050.00518.86
8.3.210.0120.00716.64
8.3.200.0060.00316.84
8.3.190.0110.00717.25
8.3.180.0130.00317.48
8.3.170.0100.00719.13
8.3.160.0150.00417.43
8.3.150.0100.01016.86
8.3.140.0050.00316.59
8.3.130.0030.01618.56
8.3.120.0030.00618.98
8.3.110.0030.00620.94
8.3.100.0040.00416.75
8.3.90.0050.00326.77
8.3.80.0030.00719.36
8.3.70.0120.00316.58
8.3.60.0140.00418.31
8.3.50.0120.00317.46
8.3.40.0070.00718.48
8.3.30.0100.00718.86
8.3.20.0060.00321.90
8.3.10.0030.00623.67
8.3.00.0000.00819.80
8.2.290.0120.00620.26
8.2.280.0130.00718.38
8.2.270.0110.00717.23
8.2.260.0110.00318.32
8.2.250.0050.00318.35
8.2.240.0060.00319.11
8.2.230.0080.00022.58
8.2.220.0090.00024.06
8.2.210.0030.00626.77
8.2.200.0040.00418.88
8.2.190.0100.01016.78
8.2.180.0040.01918.16
8.2.170.0120.00622.96
8.2.160.0070.00720.38
8.2.150.0080.00025.66
8.2.140.0030.00524.66
8.2.130.0020.00526.16
8.2.120.0040.00421.00
8.2.110.0040.00721.00
8.2.100.0140.00017.82
8.2.90.0040.00418.03
8.2.80.0000.00918.09
8.2.70.0030.00617.80
8.2.60.0000.00917.50
8.2.50.0040.00418.10
8.2.40.0040.00422.29
8.2.30.0040.00419.43
8.2.20.0090.00018.12
8.2.10.0000.00817.78
8.2.00.0050.00318.20
8.1.330.0130.00621.75
8.1.320.0080.00716.28
8.1.310.0100.00716.41
8.1.300.0060.00318.29
8.1.290.0100.00030.84
8.1.280.0040.01125.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.01222.53
8.1.230.0040.00720.87
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0040.00417.36
8.1.190.0060.00317.38
8.1.180.0060.00318.10
8.1.170.0000.00818.58
8.1.160.0080.00018.91
8.1.150.0000.00820.20
8.1.140.0040.00417.69
8.1.130.0100.00018.96
8.1.120.0000.00717.45
8.1.110.0000.00717.44
8.1.100.0030.00517.47
8.1.90.0040.00417.43
8.1.80.0040.00417.46
8.1.70.0000.00717.46
8.1.60.0000.00817.47
8.1.50.0080.00017.41
8.1.40.0050.00217.52
8.1.30.0070.00017.67
8.1.20.0000.00717.54
8.1.10.0060.00317.43
8.1.00.0030.00617.50
8.0.300.0000.00719.84
8.0.290.0030.00616.75
8.0.280.0000.00818.38
8.0.270.0000.00717.18
8.0.260.0030.00316.88
8.0.250.0040.00416.96
8.0.240.0040.00416.96
8.0.230.0030.00316.98
8.0.220.0030.00316.81
8.0.210.0080.00016.90
8.0.200.0000.00616.97
8.0.190.0070.00316.99
8.0.180.0050.00216.90
8.0.170.0000.00816.87
8.0.160.0060.00316.93
8.0.150.0050.00216.82
8.0.140.0000.00716.86
8.0.130.0050.00013.23
8.0.120.0000.00716.82
8.0.110.0000.00716.86
8.0.100.0040.00416.84
8.0.90.0080.00016.75
8.0.80.0070.00716.85
8.0.70.0040.00416.80
8.0.60.0000.00716.86
8.0.50.0050.00316.78
8.0.30.0080.00917.06
8.0.20.0130.00417.40
8.0.10.0040.00417.04
8.0.00.0080.01116.81
7.4.330.0000.00615.55
7.4.320.0030.00316.50
7.4.300.0000.00616.52
7.4.290.0030.00316.45
7.4.280.0040.00416.39
7.4.270.0040.00416.41
7.4.260.0030.00316.48
7.4.250.0070.00016.57
7.4.240.0070.00016.61
7.4.230.0070.00016.36
7.4.220.0070.00016.50
7.4.210.0070.00716.54
7.4.200.0040.00416.25
7.4.160.0080.01016.57
7.4.140.0080.01117.86
7.4.130.0090.01216.40
7.4.120.0100.00916.58
7.4.110.0110.00616.59
7.4.100.0130.01016.48
7.4.90.0100.00716.37
7.4.80.0140.01119.39
7.4.70.0060.01516.40
7.4.60.0120.00616.47
7.4.50.0060.00916.51
7.4.40.0040.01416.50
7.4.10.0030.01415.00
7.4.00.0070.00914.98
7.3.330.0030.00313.02
7.3.320.0000.00613.05
7.3.310.0000.00716.29
7.3.300.0070.00016.25
7.3.290.0070.00716.32
7.3.280.0080.00716.40
7.3.260.0130.00816.43
7.3.240.0110.00616.37
7.3.230.0110.00916.25
7.3.210.0120.00616.33
7.3.200.0090.01016.38
7.3.190.0030.01416.29
7.3.180.0130.00316.39
7.3.170.0060.00916.48
7.3.160.0070.01116.26
7.3.130.0030.01614.80
7.3.120.0060.00914.72
7.3.110.0140.00314.82
7.3.100.0030.00614.70
7.3.90.0110.00414.64
7.3.80.0060.00614.83
7.3.70.0030.00714.73
7.3.60.0100.00314.98
7.3.50.0030.01015.01
7.3.40.0030.00614.73
7.3.30.0100.00014.74
7.3.20.0090.00616.75
7.3.10.0030.01416.74
7.3.00.0090.00316.74
7.2.330.0070.01116.73
7.2.320.0040.01216.73
7.2.310.0100.00716.61
7.2.300.0040.01516.67
7.2.290.0140.00316.72
7.2.260.0100.00715.06
7.2.250.0060.00614.83
7.2.240.0100.00714.81
7.2.230.0030.01015.29
7.2.220.0070.01314.81
7.2.210.0030.01015.01
7.2.200.0120.00015.12
7.2.190.0070.00714.96
7.2.180.0040.00714.82
7.2.170.0030.01014.75
7.2.160.0060.00615.18
7.2.150.0000.01816.94
7.2.140.0040.00716.95
7.2.130.0070.00716.96
7.2.120.0070.00716.69
7.2.110.0030.00716.76
7.2.100.0080.00416.85
7.2.90.0030.00616.82
7.2.80.0110.00316.82
7.2.70.0060.00617.09
7.2.60.0020.01216.83
7.2.50.0030.00716.70
7.2.40.0060.01016.80
7.2.30.0110.01417.31
7.2.20.0090.01017.30
7.2.10.0110.00917.59
7.2.00.0120.01017.56
7.1.330.0100.00715.77
7.1.320.0110.00315.75
7.1.310.0070.00315.74
7.1.300.0030.01215.59
7.1.290.0050.00815.86
7.1.280.0030.00915.86
7.1.270.0000.01115.98
7.1.260.0070.00715.61
7.1.250.0040.00815.93
7.1.240.0030.00715.86
7.1.230.0030.00915.84
7.1.220.0000.00915.88
7.1.210.0060.00615.90
7.1.200.0070.00515.76
7.1.190.0070.00715.69
7.1.180.0090.00615.77
7.1.170.0060.00315.61
7.1.160.0070.00715.74
7.1.150.0090.01215.99
7.1.140.0110.00816.30
7.1.130.0150.00416.13
7.1.120.0120.00716.43
7.1.110.0120.00716.02
7.1.100.0080.01115.99
7.1.90.0070.01015.85
7.1.80.0080.01215.84
7.1.70.0110.00615.43
7.1.60.0270.00524.46
7.1.50.0170.01224.61
7.1.40.0160.01524.32
7.1.30.0210.01424.12
7.1.20.0200.01024.13
7.1.10.0090.00715.26
7.1.00.0070.01215.36
7.0.330.0070.00715.46
7.0.320.0040.01115.51
7.0.310.0080.00015.61
7.0.300.0000.00815.62
7.0.290.0080.00615.60
7.0.280.0000.00815.36
7.0.270.0120.00015.37
7.0.260.0080.00315.56
7.0.250.0050.00515.46
7.0.240.0040.00715.48
7.0.230.0030.00815.47
7.0.220.0000.00915.21
7.0.210.0060.00615.48
7.0.200.0040.00415.55
7.0.190.0080.00815.13
7.0.180.0040.01415.19
7.0.170.0040.01115.19
7.0.160.0050.00515.23
7.0.150.0060.00615.47
7.0.140.0030.00915.50
7.0.130.0070.00715.08
7.0.120.0040.01115.71
7.0.110.0050.00515.53
7.0.100.0040.00815.57
7.0.90.0070.00315.57
7.0.80.0030.00715.46
7.0.70.0090.00315.35
7.0.60.0050.00515.47
7.0.50.0070.00715.36
7.0.40.0040.01113.53
7.0.30.0060.00613.49
7.0.20.0040.00413.46
7.0.10.0110.00013.59
7.0.00.0040.00413.50
5.6.400.0040.00714.35
5.6.390.0060.00613.94
5.6.380.0000.01513.89
5.6.370.0070.00414.26
5.6.360.0000.00814.46
5.6.350.0060.00814.30
5.6.340.0030.00713.96
5.6.330.0000.01414.11
5.6.320.0030.01014.34
5.6.310.0000.01114.30
5.6.300.0030.01014.19
5.6.290.0030.01014.63
5.6.280.0090.00314.30
5.6.270.0000.01214.70
5.6.260.0100.00014.43
5.6.250.0040.01114.41
5.6.240.0000.01714.52
5.6.230.0030.00614.31
5.6.220.0060.00614.39
5.6.210.0070.00714.23
5.6.200.0030.00714.27
5.6.190.0130.00314.24
5.6.180.0060.00614.23
5.6.170.0090.00314.14
5.6.160.0040.00814.25
5.6.150.0060.00314.14
5.6.140.0080.00414.44
5.6.130.0000.01014.24
5.6.120.0060.00314.29
5.6.110.0100.00014.19
5.6.100.0030.00914.47
5.6.90.0060.00314.22
5.6.80.0080.00414.49
5.6.70.0030.01014.46
5.6.60.0070.00714.34
5.6.50.0070.00714.43
5.6.40.0070.00714.25
5.6.30.0030.00614.32
5.6.20.0000.01114.31
5.6.10.0040.01114.27
5.6.00.0030.00914.18

preferences:
29.76 ms | 403 KiB | 5 Q