3v4l.org

run code in 300+ PHP versions simultaneously
<?php $optimization_prompt = '[not a key] The product title is [title] and the price is [price] and this product link is [link]'; $get_product = ['title' => 'theTitle', 'price' => 45, 'link' => 'https://thelink.com']; $result = str_replace( array_map(fn($k) => "[$k]", array_keys($get_product)), $get_product, $optimization_prompt ); echo $result;

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.130.0100.01018.62
8.4.120.0120.00723.84
8.4.110.0130.00718.92
8.4.100.0120.00819.00
8.4.90.0120.00720.41
8.4.80.0100.01018.57
8.4.70.0050.00517.85
8.4.60.0130.00718.38
8.4.50.0130.00717.61
8.4.40.0110.00723.69
8.4.30.0050.00320.75
8.4.20.0030.01720.33
8.4.10.0100.01023.66
8.3.260.0120.00816.39
8.3.250.0110.00718.99
8.3.240.0040.00417.14
8.3.230.0120.00916.52
8.3.220.0120.00619.16
8.3.210.0110.00716.57
8.3.200.0060.00116.41
8.3.190.0090.01017.27
8.3.180.0120.00716.30
8.3.170.0180.00017.07
8.3.160.0120.00619.06
8.3.150.0070.01317.33
8.3.140.0050.00317.25
8.3.130.0040.00418.27
8.3.120.0100.00020.73
8.3.110.0080.00020.94
8.3.100.0100.01024.06
8.3.90.0080.00026.77
8.3.80.0060.00318.43
8.3.70.0070.00716.38
8.3.60.0140.00018.30
8.3.50.0000.02218.28
8.3.40.0100.00722.03
8.3.30.0130.00818.67
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0140.00326.16
8.2.290.0070.01220.42
8.2.280.0060.00318.42
8.2.270.0040.01518.16
8.2.260.0150.00320.76
8.2.250.0040.00416.88
8.2.240.0070.01017.14
8.2.230.0030.00622.58
8.2.220.0090.00037.54
8.2.210.0030.00526.77
8.2.200.0030.00616.75
8.2.190.0140.00018.05
8.2.180.0100.00716.75
8.2.170.0150.00018.79
8.2.160.0110.00422.96
8.2.150.0070.00025.66
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0040.00420.77
8.2.110.0090.00022.08
8.2.100.0040.00817.78
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0030.00617.50
8.2.60.0000.00817.75
8.2.50.0050.00317.75
8.2.40.0040.00419.35
8.2.30.0100.00717.61
8.2.20.0120.00417.60
8.2.10.0120.00417.59
8.2.00.0120.00317.75
8.1.330.0100.01221.95
8.1.320.0110.00815.79
8.1.310.0050.00316.67
8.1.300.0030.00620.03
8.1.290.0000.00918.88
8.1.280.0200.00025.92
8.1.270.0150.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00423.97
8.1.230.0110.00017.77
8.1.220.0050.00317.76
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00419.02
8.1.160.0040.01217.59
8.1.150.0160.00017.59
8.1.140.0100.00717.59
8.1.130.0080.00817.59
8.1.120.0100.00717.59
8.1.110.0150.00017.59
8.1.100.0120.00417.59
8.1.90.0140.00417.59
8.1.80.0110.00917.59
8.1.70.0110.00517.59
8.1.60.0170.00017.59
8.1.50.0170.00017.59
8.1.40.0150.00317.59
8.1.30.0180.00017.59
8.1.20.0180.00017.59
8.1.10.0090.00917.59
8.1.00.0180.00017.59
8.0.300.0050.00319.75
8.0.290.0040.00716.63
8.0.280.0080.00817.59
8.0.270.0110.00517.59
8.0.260.0130.00417.59
8.0.250.0110.00617.59
8.0.240.0120.00417.59
8.0.230.0110.00617.59
8.0.220.0110.00517.59
8.0.210.0160.00017.59
8.0.200.0140.00317.59
8.0.190.0110.00517.59
8.0.180.0110.00417.59
8.0.170.0160.00017.59
8.0.160.0130.00317.59
8.0.150.0100.00717.59
8.0.140.0130.00317.59
8.0.130.0120.00417.59
8.0.120.0100.00717.59
8.0.110.0070.00717.59
8.0.100.0130.00317.59
8.0.90.0130.00417.59
8.0.80.0150.00417.59
8.0.70.0160.00017.59
8.0.60.0120.00417.59
8.0.50.0110.00617.59
8.0.30.0140.00317.59
8.0.20.0130.00417.59
8.0.10.0120.00217.59

preferences:
22.58 ms | 403 KiB | 5 Q