3v4l.org

run code in 300+ PHP versions simultaneously
<?php // this is your $this->row->product_description value for demonstration purposes: $html = <<<HTML Some text yatta yatta <hr id="system-readmore" /> Some more text blah blah HTML; list($introtext, $description) = explode('<hr id="system-readmore" />', $html, 2); var_dump($introtext); var_dump($description); echo "\n---\n"; var_dump(trim($introtext)); // this is tidier, with leading trailing/whitespace characters removed var_dump(trim($description)); // this is tidier, with leading trailing/whitespace characters removed echo "\n---\n"; list($introtext, $description) = preg_split('~\s*<hr id="system-readmore" />\s*~', $html, 2); var_dump($introtext); // no trim() call, no leading/trailing whitespace characters displayed var_dump($description); // no trim() call, no leading/trailing whitespace characters displayed

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.0000.01518.43
8.3.50.0070.00718.37
8.3.40.0090.00619.00
8.3.30.0040.01218.79
8.3.20.0040.00419.04
8.3.10.0050.00321.79
8.3.00.0080.00017.91
8.2.180.0130.00716.88
8.2.170.0110.00722.96
8.2.160.0100.00319.20
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00019.95
8.2.120.0080.00026.35
8.2.110.0090.00022.23
8.2.100.0060.00618.03
8.2.90.0040.00417.88
8.2.80.0070.00319.03
8.2.70.0040.00417.77
8.2.60.0050.00317.80
8.2.50.0080.00018.10
8.2.40.0080.00019.15
8.2.30.0070.00019.38
8.2.20.0030.00618.14
8.2.10.0040.00418.09
8.2.00.0040.00419.44
8.1.280.0090.00625.92
8.1.270.0030.00523.92
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.78
8.1.230.0080.00422.75
8.1.220.0000.00818.73
8.1.210.0040.00418.77
8.1.200.0030.00517.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00818.63
8.1.160.0030.00618.72
8.1.150.0000.00718.89
8.1.140.0040.00417.67
8.1.130.0000.01019.03
8.1.120.0000.00717.57
8.1.110.0040.00417.56
8.1.100.0080.00017.56
8.1.90.0030.00517.46
8.1.80.0030.00717.52
8.1.70.0000.00717.49
8.1.60.0030.00617.57
8.1.50.0000.00717.59
8.1.40.0000.00917.64
8.1.30.0030.00517.75
8.1.20.0000.00817.65
8.1.10.0040.00417.72
8.1.00.0030.00617.73
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.37
8.0.270.0070.00017.34
8.0.260.0000.00617.14
8.0.250.0000.00717.02
8.0.240.0040.00417.16
8.0.230.0070.00017.13
8.0.220.0050.00217.03
8.0.210.0030.00417.02
8.0.200.0030.00317.18
8.0.190.0000.00817.08
8.0.180.0040.00416.96
8.0.170.0060.00317.06
8.0.160.0040.00417.03
8.0.150.0030.00417.01
8.0.140.0000.00717.03
8.0.130.0000.00513.51
8.0.120.0000.00716.99
8.0.110.0070.00017.07
8.0.100.0000.00817.01
8.0.90.0040.00416.93
8.0.80.0100.00917.04
8.0.70.0070.00016.91
8.0.60.0070.00017.02
8.0.50.0040.00417.09
8.0.30.0130.00617.26
8.0.20.0170.00617.40
8.0.10.0040.00417.20
8.0.00.0110.00917.02
7.4.330.0000.00515.55
7.4.320.0090.00016.67
7.4.300.0000.00616.64
7.4.290.0000.00716.73
7.4.280.0070.00016.59
7.4.270.0030.00516.63
7.4.260.0040.00416.65
7.4.250.0000.00716.47
7.4.240.0000.00716.68
7.4.230.0030.00316.75
7.4.220.0040.00416.63
7.4.210.0050.01216.60
7.4.200.0000.00716.65
7.4.160.0070.01116.74
7.4.140.0110.00717.86
7.4.130.0140.00316.73
7.4.120.0110.00916.63
7.4.110.0080.01116.74
7.4.100.0060.01016.63
7.4.90.0090.00616.58
7.4.80.0100.01319.39
7.4.70.0050.01116.98
7.4.60.0060.01116.46
7.4.50.0030.00916.54
7.4.40.0100.01016.64
7.4.00.0040.01215.00
7.3.330.0050.00013.34
7.3.320.0030.00313.24
7.3.310.0070.00016.55
7.3.300.0050.00316.44
7.3.290.0040.00416.46
7.3.280.0100.00716.39
7.3.260.0100.01016.67
7.3.240.0080.01016.54
7.3.230.0110.00516.49
7.3.210.0130.00716.54
7.3.200.0090.01216.50
7.3.190.0070.01016.68
7.3.180.0090.01216.59
7.3.170.0150.00316.46
7.3.160.0120.00416.54
7.2.330.0040.01316.72
7.2.320.0130.00416.86
7.2.310.0090.00916.88
7.2.300.0040.01716.54
7.2.290.0100.01016.58
7.2.60.0070.00717.04
7.2.40.0470.00918.15
7.2.30.0550.01018.35
7.2.20.0460.01018.27
7.2.10.0520.00718.05
7.2.00.1260.01117.96
7.1.200.0030.00916.09
7.1.160.0560.01016.95
7.1.150.0480.00917.13
7.1.140.0450.01016.97
7.1.130.0750.00817.16
7.1.120.0570.00916.88
7.1.110.0530.00716.17
7.1.100.0670.01016.29
7.1.90.0680.01116.43
7.1.80.0940.01216.45
7.1.70.1050.00615.27
7.1.60.1420.01633.47
7.1.50.1160.01132.82
7.1.40.1270.01032.88
7.1.30.1480.01032.86
7.1.20.1390.01333.01
7.1.10.1020.01114.84
7.1.00.1130.00915.02

preferences:
58.71 ms | 401 KiB | 5 Q