3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<EOT Article Morbi nisl tortor, consectetur vitae laoreet eu, lobortis id ipsum. Integer scelerisque blandit pulvinar. Nam tempus mi eget nunc laoreet venenatis. Proin viverra, erat at accumsan tincidunt, ante mi cursus elit, non Fogsu congue mauris dolor ac elit. Maecenas mollis nisl a sem semper ornare. Integer nunc purus, dapibus nec dignissim sed, dictum eget leo. Etiam in mi ut erat pretium fringilla sed EOT; $lines = explode("\n", $text); print_r($lines); $class = 'single'; foreach ($lines as $line) { if ( strlen($line) == 0) { $class = 'double'; } else { printf ('<p class="%s">%s</p>', $class, $line); $class = 'single'; } }

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.0120.00318.43
8.3.50.0070.01422.06
8.3.40.0070.00718.68
8.3.30.0110.00318.96
8.3.20.0000.00720.04
8.3.10.0000.00821.92
8.3.00.0070.00022.43
8.2.180.0090.01216.50
8.2.170.0090.00622.96
8.2.160.0110.00420.94
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0030.00626.16
8.2.120.0080.00019.37
8.2.110.0080.00022.07
8.2.100.0060.00617.78
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0000.00817.47
8.2.60.0060.00318.05
8.2.50.0000.00818.07
8.2.40.0000.00718.34
8.2.30.0040.00418.15
8.2.20.0040.00417.72
8.2.10.0080.00017.76
8.2.00.0040.00417.82
8.1.280.0070.00725.92
8.1.270.0060.00323.86
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.78
8.1.230.0110.00019.04
8.1.220.0080.00017.78
8.1.210.0030.00518.77
8.1.200.0040.00817.00
8.1.190.0030.00617.41
8.1.180.0000.00818.10
8.1.170.0100.00018.66
8.1.160.0000.00721.96
8.1.150.0040.00420.46
8.1.140.0070.00017.39
8.1.130.0000.00717.80
8.1.120.0030.00517.39
8.1.110.0000.00717.55
8.1.100.0050.00317.47
8.1.90.0040.00317.41
8.1.80.0000.00717.46
8.1.70.0030.00317.45
8.1.60.0040.00417.60
8.1.50.0050.00217.53
8.1.40.0000.00817.55
8.1.30.0000.00917.49
8.1.20.0000.00817.60
8.1.10.0040.00417.53
8.1.00.0040.00417.43
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0040.00418.40
8.0.270.0030.00317.18
8.0.260.0000.00716.90
8.0.250.0000.00816.98
8.0.240.0000.00716.97
8.0.230.0000.00716.92
8.0.220.0000.00716.96
8.0.210.0040.00416.98
8.0.200.0030.00316.99
8.0.190.0030.00616.89
8.0.180.0000.00716.95
8.0.170.0000.00816.93
8.0.160.0050.00216.88
8.0.150.0050.00316.80
8.0.140.0050.00316.91
8.0.130.0030.00313.38
8.0.120.0060.00316.99
8.0.110.0040.00416.88
8.0.100.0050.00216.85
8.0.90.0050.00316.77
8.0.80.0060.01016.93
8.0.70.0070.00016.98
8.0.60.0040.00416.94
8.0.50.0040.00416.79
8.0.30.0100.00917.13
8.0.20.0110.01117.40
8.0.10.0000.00816.91
8.0.00.0120.00616.88
7.4.330.0030.00315.14
7.4.320.0030.00316.43
7.4.300.0030.00316.47
7.4.290.0030.00316.62
7.4.280.0060.00016.63
7.4.270.0030.00316.61
7.4.260.0000.00716.47
7.4.250.0040.00416.50
7.4.240.0020.00516.60
7.4.230.0000.00716.68
7.4.220.0070.01016.73
7.4.210.0060.00916.61
7.4.200.0000.00716.49
7.4.190.0050.00216.38
7.4.160.0040.01216.45
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0060.01116.56
7.4.120.0090.00916.61
7.4.110.0120.00416.46
7.4.100.0190.00316.63
7.4.90.0130.00716.37
7.4.80.0110.00619.39
7.4.70.0090.00916.39
7.4.60.0040.01216.57
7.4.50.0090.00016.32
7.4.40.0040.01522.77
7.4.30.0100.00616.63
7.4.00.0070.00715.08
7.3.330.0000.00513.33
7.3.320.0050.00013.30
7.3.310.0040.00416.16
7.3.300.0040.00416.41
7.3.290.0090.00616.37
7.3.280.0080.00916.36
7.3.270.0120.00617.40
7.3.260.0090.00616.58
7.3.250.0080.01116.30
7.3.240.0060.01116.28
7.3.230.0030.01316.39
7.3.210.0110.00916.73
7.3.200.0050.01819.39
7.3.190.0110.01116.51
7.3.180.0100.01016.58
7.3.170.0130.00916.41
7.3.160.0070.01016.52
7.3.120.0120.00015.06
7.3.00.0000.01516.47
7.2.330.0100.00716.56
7.2.320.0170.00316.64
7.2.310.0120.00616.54
7.2.300.0030.01416.58
7.2.290.0100.00616.57
7.2.130.0070.00716.90
7.2.120.0040.01116.85
7.2.110.0060.00616.50
7.2.100.0120.00016.93
7.2.90.0130.00316.57
7.2.80.0090.00316.75
7.2.70.0040.01116.66
7.2.60.0130.00516.81
7.2.50.0030.00816.90
7.2.40.0000.01116.49
7.2.30.0030.00616.78
7.2.20.0100.00316.75
7.2.10.0040.01116.61
7.2.00.0050.00718.13
7.1.250.0190.00015.30
7.1.240.0030.00615.65
7.1.230.0040.01115.57
7.1.220.0090.00015.61
7.1.210.0040.01115.55
7.1.200.0220.00215.55
7.1.190.0040.00415.56
7.1.180.0120.00015.81
7.1.170.0070.01015.69
7.1.160.0030.01015.62
7.1.150.0100.00315.61
7.1.140.0070.00315.84
7.1.130.0090.00915.80
7.1.120.0110.00715.64
7.1.110.0000.01115.39
7.1.100.0060.00717.04
7.1.90.0090.00615.65
7.1.80.0060.00615.86
7.1.70.0030.00716.47
7.1.60.0040.01417.63
7.1.50.0040.01416.31
7.1.40.0140.00015.34
7.1.30.0060.00315.45
7.1.20.0080.00815.65
7.1.10.0070.01015.63
7.1.00.0070.03719.05
7.0.330.0080.00315.29
7.0.320.0090.00315.54
7.0.310.0110.00415.29
7.0.300.0090.00315.36
7.0.290.0000.00815.29
7.0.280.0080.00014.85
7.0.270.0040.01115.09
7.0.260.0080.00315.41
7.0.250.0060.00615.27
7.0.240.0060.00315.40
7.0.230.0100.01015.34
7.0.220.0030.00915.12
7.0.210.0030.01015.32
7.0.200.0020.00815.91
7.0.190.0110.00315.50
7.0.180.0070.00715.36
7.0.170.0040.00815.17
7.0.160.0050.00515.19
7.0.150.0130.00315.05
7.0.140.0030.04018.58
7.0.130.0070.00715.31
7.0.120.0070.00315.21
7.0.110.0070.00415.19
7.0.100.0070.00315.43
7.0.90.0030.00715.51
7.0.80.0080.00315.29
7.0.70.0090.00015.43
7.0.60.0100.04317.54
7.0.50.0030.02816.68
7.0.40.0080.04516.67
7.0.30.0150.02716.87
7.0.20.0150.04016.69
7.0.10.0180.04516.76
7.0.00.0050.03016.73
5.6.380.0090.00314.12
5.6.370.0000.01114.35
5.6.360.0000.00914.42
5.6.350.0100.00014.15
5.6.340.0100.00314.08
5.6.330.0060.00614.14
5.6.320.0150.00014.28
5.6.310.0110.00414.32
5.6.300.0030.01213.96
5.6.290.0040.01114.09
5.6.280.0020.04317.59
5.6.270.0040.00814.29
5.6.260.0000.01114.45
5.6.250.0050.00314.29
5.6.240.0040.00714.14
5.6.230.0030.01014.46
5.6.220.0000.01314.27
5.6.210.0080.03817.32
5.6.200.0080.04316.17
5.6.190.0070.04117.29
5.6.180.0100.03617.40
5.6.170.0200.04417.39
5.6.160.0050.04917.20
5.6.150.0070.03216.15
5.6.140.0090.02016.25
5.6.130.0070.04316.15
5.6.120.0100.03717.55
5.6.110.0080.04117.53
5.6.100.0150.03917.54
5.6.90.0090.04617.66
5.6.80.0040.04717.17
5.6.70.0170.03517.25
5.6.60.0030.00614.12
5.6.50.0070.00313.88
5.6.40.0000.01114.20
5.6.30.0030.00713.97
5.6.20.0090.00613.91
5.6.10.0040.01114.06
5.6.00.0040.00813.99
5.5.380.0080.00011.18
5.5.370.0070.00311.18
5.5.360.0030.00911.18
5.5.350.0050.02215.87
5.5.340.0030.02714.58
5.5.330.0060.02215.67
5.5.320.0180.03815.76
5.5.310.0100.02515.82
5.5.300.0080.02514.64
5.5.290.0080.04314.55
5.5.280.0080.02216.07
5.5.270.0030.03316.02
5.5.260.0000.03915.98
5.5.250.0020.05015.83
5.5.240.0050.04215.66
5.5.230.0000.01211.18
5.5.220.0070.00011.18
5.5.210.0040.00411.18
5.5.200.0040.00411.18
5.5.190.0040.00711.18
5.5.180.0040.00811.18
5.5.170.0000.00911.18
5.5.160.0040.00411.18
5.5.150.0060.00611.18
5.5.140.0000.00911.18
5.5.130.0000.00911.18
5.5.120.0050.00511.18
5.5.110.0030.00311.18
5.5.100.0000.00611.18
5.5.90.0060.00311.18
5.5.80.0000.00911.18
5.5.70.0000.01011.18
5.5.60.0060.00311.18
5.5.50.0060.00011.18
5.5.40.0000.00811.18
5.5.30.0000.00811.18
5.5.20.0000.01211.18
5.5.10.0080.00011.18
5.5.00.0060.00311.18
5.4.450.0120.02515.32
5.4.440.0320.02115.33
5.4.430.0370.02715.36
5.4.420.0270.02515.35
5.4.410.0030.03414.93
5.4.400.0050.03214.98
5.4.390.0150.03414.89
5.4.380.0100.03214.89
5.4.370.0070.03214.96
5.4.360.0070.03014.94
5.4.350.0120.02814.93
5.4.340.0030.03214.90
5.4.330.0000.00811.22
5.4.320.0090.02611.83
5.4.310.0050.02311.83
5.4.300.0040.02211.85
5.4.290.0030.02311.83
5.4.280.0030.02211.76
5.4.270.0090.01811.76
5.4.260.0010.02611.76
5.4.250.0070.02511.76
5.4.240.0070.02111.76
5.4.230.0040.02011.76
5.4.220.0020.02211.76
5.4.210.0070.01811.76
5.4.200.0070.02211.76
5.4.190.0040.02111.75
5.4.180.0050.01911.75
5.4.170.0050.01911.76
5.4.160.0040.02211.76
5.4.150.0090.02611.76
5.4.140.0080.02011.60
5.4.130.0060.01711.59
5.4.120.0030.02211.57
5.4.110.0050.02311.57
5.4.100.0040.02211.57
5.4.90.0040.02211.57
5.4.80.0060.02011.58
5.4.70.0050.02011.57
5.4.60.0060.02011.57
5.4.50.0060.02011.57
5.4.40.0060.02011.56
5.4.30.0050.02111.56
5.4.20.0080.02611.56
5.4.10.0020.02311.56
5.4.00.0050.02211.31
5.3.290.0050.02311.99
5.3.280.0040.02111.94
5.3.270.0070.02411.95
5.3.260.0060.02311.95
5.3.250.0030.02911.95
5.3.240.0050.02211.95
5.3.230.0020.02611.94
5.3.220.0040.02211.93
5.3.210.0020.02811.93
5.3.200.0040.02411.93
5.3.190.0050.02311.93
5.3.180.0040.02111.92
5.3.170.0040.02111.92
5.3.160.0020.02411.93
5.3.150.0040.02211.92
5.3.140.0060.02011.92
5.3.130.0040.04111.92
5.3.120.0090.02411.92
5.3.110.0080.02811.92
5.3.100.0080.02611.65
5.3.90.0060.02511.63
5.3.80.0080.02211.63
5.3.70.0050.02611.63
5.3.60.0040.02211.62
5.3.50.0060.01911.59
5.3.40.0020.02411.59
5.3.30.0050.02011.56
5.3.20.0060.01911.45
5.3.10.0040.02011.43
5.3.00.0060.02211.42
5.2.170.0030.01810.18
5.2.160.0040.01810.18
5.2.150.0020.01910.18
5.2.140.0060.01710.18
5.2.130.0020.02010.16
5.2.120.0030.02410.15
5.2.110.0020.01810.16
5.2.100.0050.01410.16
5.2.90.0060.01510.16
5.2.80.0020.02010.15
5.2.70.0040.01710.15
5.2.60.0040.01710.13
5.2.50.0060.01510.12
5.2.40.0030.01610.10
5.2.30.0050.01510.09
5.2.20.0040.01610.10
5.2.10.0030.01710.05
5.2.00.0030.0169.98
5.1.60.0020.0149.62
5.1.50.0020.0179.62
5.1.40.0060.0139.61
5.1.30.0040.0149.78
5.1.20.0060.0139.80
5.1.10.0010.0169.66
5.1.00.0060.0119.66
5.0.50.0040.0108.90
5.0.40.0000.0148.83
5.0.30.0020.0188.73
5.0.20.0000.0148.72
5.0.10.0020.0138.71
5.0.00.0010.0188.71
4.4.90.0020.0107.98
4.4.80.0020.0107.96
4.4.70.0020.0107.96
4.4.60.0020.0097.97
4.4.50.0050.0077.97
4.4.40.0010.0157.94
4.4.30.0020.0097.97
4.4.20.0040.0078.01
4.4.10.0020.0108.01
4.4.00.0030.0147.97
4.3.110.0030.0107.92
4.3.100.0010.0117.92
4.3.90.0010.0117.90
4.3.80.0030.0147.88
4.3.70.0010.0097.90
4.3.60.0040.0087.90
4.3.50.0020.0107.90
4.3.40.0050.0147.86
4.3.30.0040.0107.24
4.3.20.0030.0117.23
4.3.10.0020.0117.20
4.3.00.0030.00813.14

preferences:
44.81 ms | 401 KiB | 5 Q