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 = preg_replace_callback( '~\[([^][]+)]~', fn($m) => $get_product[$m[1]] ?? $m[0], $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.0070.00818.09
8.4.120.0070.00920.63
8.4.110.0120.00818.75
8.4.100.0120.00917.96
8.4.90.0110.01020.38
8.4.80.0040.00718.84
8.4.70.0060.00218.13
8.4.60.0140.00718.63
8.4.50.0110.01018.07
8.4.40.0060.01223.95
8.4.30.0060.00320.69
8.4.20.0030.00620.44
8.4.10.0170.00323.83
8.3.260.0120.01016.68
8.3.250.0100.00619.03
8.3.240.0070.00416.79
8.3.230.0050.00316.75
8.3.220.0130.00519.17
8.3.210.0100.00816.82
8.3.200.0030.00616.80
8.3.190.0060.00217.05
8.3.180.0040.00316.67
8.3.170.0090.00919.09
8.3.160.0030.00518.42
8.3.150.0030.01620.63
8.3.140.0120.00316.94
8.3.130.0090.00016.79
8.3.120.0140.00418.89
8.3.110.0090.00020.94
8.3.100.0040.00824.06
8.3.90.0080.00026.77
8.3.80.0090.00016.75
8.3.70.0110.01116.75
8.3.60.0070.01118.43
8.3.50.0040.01116.61
8.3.40.0110.00322.03
8.3.30.0110.00718.76
8.3.20.0060.00324.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.290.0140.00517.45
8.2.280.0040.00418.73
8.2.270.0110.00717.22
8.2.260.0120.00318.80
8.2.250.0040.01116.73
8.2.240.0060.00317.46
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0110.00826.77
8.2.200.0030.00616.63
8.2.190.0060.00916.88
8.2.180.0080.00818.41
8.2.170.0070.00719.26
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0050.00221.12
8.2.110.0030.00619.33
8.2.100.0040.00717.97
8.2.90.0040.00418.16
8.2.80.0040.00419.33
8.2.70.0000.01117.88
8.2.60.0030.00617.75
8.2.50.0040.00417.75
8.2.40.0030.00619.72
8.2.30.0130.00317.88
8.2.20.0150.00317.59
8.2.10.0120.00717.59
8.2.00.0160.00417.59
8.1.330.0110.00816.44
8.1.320.0090.00616.71
8.1.310.0130.00616.95
8.1.300.0080.00018.27
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0060.00322.06
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0100.00022.25
8.1.230.0120.00022.83
8.1.220.0040.00417.74
8.1.210.0050.00318.89
8.1.200.0090.00017.60
8.1.190.0100.00017.53
8.1.180.0000.00818.10
8.1.170.0000.00718.87
8.1.160.0130.00317.59
8.1.150.0090.00917.59
8.1.140.0110.00517.59
8.1.130.0100.00617.59
8.1.120.0070.01017.59
8.1.110.0120.00717.59
8.1.100.0170.00017.59
8.1.90.0160.00017.59
8.1.80.0140.00217.59
8.1.70.0040.01217.59
8.1.60.0090.00917.60
8.1.50.0110.00617.59
8.1.40.0100.01017.63
8.1.30.0140.00517.59
8.1.20.0180.00017.59
8.1.10.0100.00717.59
8.1.00.0130.00417.59
8.0.300.0040.00420.16
8.0.290.0050.00316.75
8.0.280.0170.00017.59
8.0.270.0090.00917.59
8.0.260.0140.00217.59
8.0.250.0100.00717.59
8.0.240.0160.00017.59
8.0.230.0040.01317.59
8.0.220.0100.00717.59
8.0.210.0160.00017.59
8.0.200.0150.00017.59
8.0.190.0110.00617.59
8.0.180.0130.00417.59
8.0.170.0170.00017.59
8.0.160.0120.00617.59
8.0.150.0120.00517.59
8.0.140.0140.00317.59
8.0.130.0150.00017.59
8.0.120.0110.00517.59
8.0.110.0100.00517.59
8.0.100.0110.00417.59
8.0.90.0120.00517.59
8.0.80.0130.00317.59
8.0.70.0130.00417.59
8.0.60.0130.00317.59
8.0.50.0160.00017.59
8.0.30.0140.00317.59
8.0.20.0130.00417.59
8.0.10.0160.00017.59

preferences:
75.22 ms | 403 KiB | 5 Q