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>'."\n", $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.70.0150.00316.38
8.3.60.0100.00718.08
8.3.50.0200.01121.98
8.3.40.0140.00018.63
8.3.30.0100.00319.14
8.3.20.0000.00820.29
8.3.10.0040.00422.00
8.3.00.0040.00422.31
8.2.180.0090.00616.38
8.2.170.0070.01022.96
8.2.160.0140.00020.82
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00619.36
8.2.110.0060.00322.05
8.2.100.0040.00717.78
8.2.90.0000.00719.28
8.2.80.0030.00517.97
8.2.70.0000.00917.38
8.2.60.0030.00617.91
8.2.50.0060.00318.07
8.2.40.0080.00018.16
8.2.30.0000.00718.02
8.2.20.0070.00017.54
8.2.10.0060.00317.77
8.2.00.0040.00417.63
8.1.280.0110.00725.92
8.1.270.0060.00323.75
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0080.00418.83
8.1.220.0080.00017.76
8.1.210.0080.00018.77
8.1.200.0060.00617.34
8.1.190.0000.00817.40
8.1.180.0050.00318.10
8.1.170.0030.00718.64
8.1.160.0000.00722.04
8.1.150.0040.00418.70
8.1.140.0030.00617.52
8.1.130.0000.00717.76
8.1.120.0030.00517.50
8.1.110.0040.00417.32
8.1.100.0040.00417.36
8.1.90.0000.00717.34
8.1.80.0070.00017.54
8.1.70.0000.00717.38
8.1.60.0080.00017.64
8.1.50.0000.00817.54
8.1.40.0000.00717.53
8.1.30.0000.00817.56
8.1.20.0000.00817.55
8.1.10.0050.00317.50
8.1.00.0000.00717.43
8.0.300.0050.00318.77
8.0.290.0000.00717.16
8.0.280.0070.00018.50
8.0.270.0040.00417.34
8.0.260.0030.00316.95
8.0.250.0000.00716.91
8.0.240.0030.00616.98
8.0.230.0070.00017.03
8.0.220.0000.00816.98
8.0.210.0000.00717.04
8.0.200.0080.00017.07
8.0.190.0100.00017.02
8.0.180.0000.00716.95
8.0.170.0050.00316.91
8.0.160.0000.00717.04
8.0.150.0040.00416.92
8.0.140.0000.00716.95
8.0.130.0050.00013.38
8.0.120.0080.00016.91
8.0.110.0040.00416.79
8.0.100.0070.00016.97
8.0.90.0040.00417.04
8.0.80.0130.00316.96
8.0.70.0000.00717.00
8.0.60.0040.00416.96
8.0.50.0000.00817.03
8.0.30.0060.01217.08
8.0.20.0120.00617.40
8.0.10.0040.00417.09
8.0.00.0150.00516.74
7.4.330.0050.00015.14
7.4.320.0050.00316.38
7.4.300.0060.00016.62
7.4.290.0030.00316.42
7.4.280.0040.00416.43
7.4.270.0070.00016.51
7.4.260.0030.00316.52
7.4.250.0000.00716.41
7.4.240.0040.00416.62
7.4.230.0000.00716.40
7.4.220.0060.01216.56
7.4.210.0090.00816.58
7.4.200.0000.00816.32
7.4.190.0000.00816.67
7.4.160.0130.01016.50
7.4.150.0070.01117.40
7.4.140.0150.00517.86
7.4.130.0090.00816.43
7.4.120.0110.00716.50
7.4.110.0130.00316.33
7.4.100.0040.01216.57
7.4.90.0080.00816.34
7.4.80.0090.00919.39
7.4.70.0040.01216.42
7.4.60.0060.01016.42
7.4.50.0040.00016.64
7.4.40.0120.00322.77
7.4.30.0100.00616.62
7.4.00.0060.00715.07
7.3.330.0060.00013.33
7.3.320.0060.00013.30
7.3.310.0030.00316.33
7.3.300.0000.00716.41
7.3.290.0080.01216.42
7.3.280.0120.00616.44
7.3.270.0120.00617.40
7.3.260.0170.00016.32
7.3.250.0120.00816.46
7.3.240.0100.01316.41
7.3.230.0130.00416.39
7.3.210.0120.00916.51
7.3.200.0090.00919.39
7.3.190.0090.00916.48
7.3.180.0130.00316.49
7.3.170.0110.00516.67
7.3.160.0160.00616.37
7.3.120.0090.00014.81
7.2.330.0120.00616.66
7.2.320.0120.01316.67
7.2.310.0140.00616.63
7.2.300.0130.00416.66
7.2.290.0110.00516.55
7.2.60.0060.00616.91
7.1.200.0030.00615.80
7.1.70.0040.00417.23
7.1.60.0080.01519.82
7.1.50.0090.01216.79
7.1.00.0000.07722.36
7.0.200.0040.00416.87
7.0.140.0070.06722.08
7.0.60.0070.08319.95
7.0.50.0070.08017.85
7.0.40.0030.06020.40
7.0.30.0300.04320.11
7.0.20.0270.06320.12
7.0.10.0130.08020.30
7.0.00.0030.04720.33
5.6.280.0130.06321.14
5.6.210.0000.08320.50
5.6.200.0030.08318.13
5.6.190.0030.05020.50
5.6.180.3600.04020.33
5.6.170.0170.04020.63
5.6.160.0030.07720.61
5.6.150.0030.04018.14
5.6.140.0030.04318.27
5.6.130.0100.07318.19
5.6.120.0070.08721.12
5.6.110.0030.08721.02
5.6.100.0070.08321.08
5.6.90.0070.08020.95
5.6.80.0100.04320.37
5.6.70.4470.04020.38
5.5.350.0100.07020.32
5.5.340.0100.07318.09
5.5.330.0000.04720.27
5.5.320.0330.05720.41
5.5.310.0330.07320.26
5.5.300.0070.08318.07
5.5.290.0130.07317.98
5.5.280.0070.08320.80
5.5.270.0100.08320.67
5.5.260.0170.07320.96
5.5.250.0000.05320.68
5.5.240.0270.05020.34
5.4.450.0770.05019.48
5.4.440.0330.04319.32
5.4.430.0170.04319.52
5.4.420.0630.03019.40
5.4.410.0130.05018.94
5.4.400.0130.05318.80
5.4.390.0070.06018.63
5.4.380.0170.05018.61
5.4.370.0230.04318.71
5.4.360.0100.06718.70
5.4.350.0130.05718.49
5.4.340.0200.04718.63
5.4.320.0100.03912.48
5.4.310.0060.04712.48
5.4.300.0070.04312.48
5.4.290.0080.03812.48
5.4.280.0070.03612.34
5.4.270.0090.03512.34
5.4.260.0070.03712.35
5.4.250.0060.03812.35
5.4.240.0090.03412.34
5.4.230.0050.04012.34
5.4.220.0070.03512.34
5.4.210.0060.03612.34
5.4.200.0070.03612.34
5.4.190.0060.03612.34
5.4.180.0050.04912.33
5.4.170.0090.03712.35
5.4.160.0070.03512.34
5.4.150.0030.03812.33
5.4.140.0030.04012.02
5.4.130.0070.03412.00
5.4.120.0040.03711.96
5.4.110.0050.03511.96
5.4.100.0080.03411.96
5.4.90.0060.03711.96
5.4.80.0070.03711.96
5.4.70.0060.03411.96
5.4.60.0050.03611.95
5.4.50.0070.03711.96
5.4.40.0080.04311.95
5.4.30.0050.03611.94
5.4.20.0060.03411.95
5.4.10.0020.03811.95
5.4.00.0030.04611.43
5.3.290.0070.04212.80
5.3.280.0080.04112.71
5.3.270.0060.03912.73
5.3.260.0050.04012.72
5.3.250.0070.04712.72
5.3.240.0050.03912.72
5.3.230.0070.03612.71
5.3.220.0080.03412.68
5.3.210.0060.03812.68
5.3.200.0040.03812.68
5.3.190.0060.03712.68
5.3.180.0040.03912.67
5.3.170.0030.03912.67
5.3.160.0080.03412.67
5.3.150.0080.03412.68
5.3.140.0080.03412.66
5.3.130.0060.03912.66
5.3.120.0060.03812.66
5.3.110.0070.03812.66
5.3.100.0080.03512.11
5.3.90.0030.03812.08
5.3.80.0060.04112.07
5.3.70.0080.03412.07
5.3.60.0030.03912.06
5.3.50.0070.04012.00
5.3.40.0070.04012.00
5.3.30.0120.03311.95
5.3.20.0060.03511.72
5.3.10.0040.03511.69
5.3.00.0060.03511.67
5.2.170.0100.0369.17
5.2.160.0060.0289.18
5.2.150.0050.0299.18
5.2.140.0070.0359.18
5.2.130.0020.0319.14
5.2.120.0040.0289.14
5.2.110.0080.0269.14
5.2.100.0060.0279.14
5.2.90.0050.0319.14
5.2.80.0060.0299.13
5.2.70.0030.0319.13
5.2.60.0060.0349.08
5.2.50.0070.0359.06
5.2.40.0040.0299.02
5.2.30.0120.0359.00
5.2.20.0030.0319.02
5.2.10.0070.0378.93
5.2.00.0050.0408.79
5.1.60.0050.0348.06
5.1.50.0050.0278.06
5.1.40.0020.0268.05
5.1.30.0020.0298.39
5.1.20.0040.0278.42
5.1.10.0050.0358.14
5.1.00.0050.0288.14
5.0.50.0040.0236.62
5.0.40.0060.0266.48
5.0.30.0060.0396.29
5.0.20.0060.0246.27
5.0.10.0060.0256.25
5.0.00.0030.0406.24
4.4.90.0040.0214.78
4.4.80.0030.0164.75
4.4.70.0030.0154.75
4.4.60.0020.0174.75
4.4.50.0020.0164.77
4.4.40.0000.0274.71
4.4.30.0030.0154.76
4.4.20.0030.0164.84
4.4.10.0040.0144.85
4.4.00.0030.0254.76
4.3.110.0000.0204.67
4.3.100.0010.0174.67
4.3.90.0030.0144.64
4.3.80.0020.0254.59
4.3.70.0050.0124.63
4.3.60.0030.0144.63
4.3.50.0030.0154.62
4.3.40.0020.0254.54
4.3.30.0050.0133.30
4.3.20.0030.0153.29
4.3.10.0030.0153.22
4.3.00.0000.02015.11

preferences:
39.55 ms | 401 KiB | 5 Q