3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Subject: Update on Your Ticket: ID {{ random_number }} Body: Hello, Your ticket has been recently updated on {{ date }}. We kindly request you to review and acknowledge the changes made. If you have any further updates or queries regarding your ticket, please don't hesitate to respond to this email. Best Regards, {{ sender_name }}"; $parts = explode('Body:', $string); $subject = trim(str_replace('Subject:', '', $parts[0])); $body = trim($parts[1]); echo 'Subject = "'.$subject.'"'; echo PHP_EOL.PHP_EOL; echo 'Body = "'.$body.'"';

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.140.0140.00817.89
8.4.130.0150.00517.29
8.4.120.0150.00524.02
8.4.110.0100.01122.46
8.4.100.0070.00118.83
8.4.90.0110.00918.75
8.4.80.0120.00618.71
8.4.70.0040.00417.89
8.4.60.0120.00818.76
8.4.50.0040.00518.74
8.4.40.0070.01317.49
8.4.30.0150.00320.59
8.4.20.0130.00622.61
8.4.10.0060.00323.86
8.3.270.0100.01216.69
8.3.260.0120.00616.74
8.3.250.0100.00918.88
8.3.240.0110.00917.18
8.3.230.0110.00816.40
8.3.220.0120.00418.93
8.3.210.0090.00616.48
8.3.200.0050.00316.50
8.3.190.0120.00617.27
8.3.180.0100.00517.27
8.3.170.0160.00420.50
8.3.160.0090.00917.16
8.3.150.0130.00716.96
8.3.140.0070.00716.45
8.3.130.0000.01316.80
8.3.120.0090.00018.98
8.3.110.0070.00720.94
8.3.100.0120.00624.06
8.3.90.0080.00026.77
8.3.80.0040.00418.30
8.3.70.0180.00418.30
8.3.60.0140.00019.99
8.3.50.0060.00916.47
8.3.40.0030.01221.94
8.3.30.0030.01420.34
8.3.20.0050.00324.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.290.0130.00620.48
8.2.280.0120.00718.54
8.2.270.0130.00716.97
8.2.260.0110.00416.75
8.2.250.0080.00016.50
8.2.240.0030.00616.79
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0140.00426.77
8.2.200.0060.00318.29
8.2.190.0040.01116.58
8.2.180.0170.00016.75
8.2.170.0150.00018.82
8.2.160.0110.00422.96
8.2.150.0070.00025.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0050.00319.78
8.2.110.0090.00020.97
8.2.100.0040.00717.70
8.2.90.0000.00818.16
8.2.80.0000.00820.27
8.2.70.0040.00479.33
8.2.60.0190.00079.33
8.2.50.0050.00579.33
8.2.40.0090.00979.33
8.2.30.0040.01379.33
8.2.20.0040.00479.33
8.2.10.0130.00379.33
8.2.00.0060.00979.33
8.1.330.0130.00522.09
8.1.320.0150.00416.08
8.1.310.0100.00716.81
8.1.300.0110.00416.09
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0000.00724.66
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00421.99
8.1.230.0080.00320.90
8.1.220.0050.00317.79
8.1.210.0000.00818.97
8.1.200.0130.00479.33
8.1.190.0080.00879.33
8.1.180.0140.00379.33
8.1.170.0130.00379.33
8.1.160.0150.00579.33
8.1.150.0130.00579.33
8.1.140.0100.00579.33
8.1.130.0120.00479.33
8.1.120.0130.00479.33
8.1.110.0050.01079.33
8.1.100.0000.01679.33
8.1.90.0090.00679.33
8.1.80.0130.00479.33
8.1.70.0030.01379.33
8.1.60.0110.00779.33
8.1.50.0140.00379.33
8.1.40.0110.00679.33
8.1.30.0120.00679.33
8.1.20.0150.00379.33
8.1.10.0150.00479.33
8.1.00.0170.00379.33
8.0.300.0070.00020.09
8.0.290.0090.00979.33
8.0.280.0000.01879.33
8.0.270.0190.00079.33
8.0.260.0150.00379.33
8.0.250.0100.00779.33
8.0.240.0100.00779.33
8.0.230.0140.00279.33
8.0.220.0130.00379.33
8.0.210.0180.00079.33
8.0.200.0150.00479.33
8.0.190.0090.00979.33
8.0.180.0040.01279.33
8.0.170.0070.00979.33
8.0.160.0090.00979.33
8.0.150.0170.00079.33
8.0.140.0100.00579.33
8.0.130.0150.00379.33
8.0.120.0110.00579.33
8.0.110.0160.00079.33
8.0.100.0070.01079.33
8.0.90.0140.00379.33
8.0.80.0030.01379.33
8.0.70.0170.00079.33
8.0.60.0170.00079.33
8.0.50.0110.00679.33
8.0.30.0140.00279.33
8.0.20.0120.00479.33
8.0.10.0110.00479.33

preferences:
31.52 ms | 403 KiB | 5 Q