3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Hello {first_name}, from {company}. This is your email address: {email}. Your application for {team} has been approved."; $placeholders = ["company" => "contoso inc", "name" => "john doe", "email" => "me@contoso.com"]; echo preg_replace_callback('/\s*\{([^{}}]*)\}/', function ($match) use ($placeholders) { return isset($placeholders[$match[1]]) ? " " . $placeholders[$match[1]] : ""; }, $text);

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.5.10.0090.00920.23
8.5.00.0110.01120.27
8.4.150.0020.00114.05
8.4.140.0110.01117.59
8.4.130.0110.00918.74
8.4.120.0110.00923.89
8.4.110.0070.00518.84
8.4.100.0080.01218.76
8.4.90.0100.01120.61
8.4.80.0040.00418.69
8.4.70.0090.00718.89
8.4.60.0120.00918.41
8.4.50.0140.00718.73
8.4.40.0050.00319.75
8.4.30.0000.01818.67
8.4.20.0060.00617.80
8.4.10.0050.00523.94
8.3.280.0130.00721.01
8.3.270.0130.00816.76
8.3.260.0110.00916.70
8.3.250.0030.00619.10
8.3.240.0020.00717.13
8.3.230.0120.00717.05
8.3.220.0110.00718.88
8.3.210.0110.00716.89
8.3.200.0040.00516.73
8.3.190.0130.00517.21
8.3.180.0140.00418.99
8.3.170.0120.00620.56
8.3.160.0100.00717.19
8.3.150.0070.01116.76
8.3.140.0060.00617.16
8.3.130.0040.00418.41
8.3.120.0090.00020.70
8.3.110.0070.01116.87
8.3.100.0100.00018.71
8.3.90.0090.00026.77
8.3.80.0070.00316.73
8.3.70.0150.00016.58
8.3.60.0070.00718.27
8.3.50.0090.00920.38
8.3.40.0040.01420.16
8.3.30.0120.00318.85
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.290.0110.00720.83
8.2.280.0130.00618.54
8.2.270.0090.00916.86
8.2.260.0110.00717.00
8.2.250.0120.00616.88
8.2.240.0040.00416.95
8.2.230.0030.00520.94
8.2.220.0080.00024.06
8.2.210.0090.00926.77
8.2.200.0030.00618.54
8.2.190.0160.00016.88
8.2.180.0120.00325.92
8.2.170.0080.01119.07
8.2.160.0100.00322.96
8.2.150.0000.00825.66
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0030.00626.16
8.2.110.0060.00320.52
8.2.100.0120.00017.84
8.2.90.0040.00417.75
8.2.80.0060.00319.09
8.2.70.0000.00817.74
8.2.60.0000.00817.88
8.2.50.0040.00418.05
8.2.40.0040.00418.22
8.2.30.0040.00418.21
8.2.20.0000.00719.25
8.2.10.0040.00418.16
8.2.00.0040.00419.39
8.1.330.0120.00822.07
8.1.320.0110.00817.95
8.1.310.0100.01016.00
8.1.300.0060.00318.48
8.1.290.0000.01030.84
8.1.280.0040.01125.92
8.1.270.0040.00424.66
8.1.260.0050.00226.35
8.1.250.0070.00328.09
8.1.240.0060.00622.16
8.1.230.0060.00623.98
8.1.220.0050.00318.76
8.1.210.0050.00518.77
8.1.200.0000.00817.60
8.1.190.0030.00517.38
8.1.180.0100.00018.10
8.1.170.0030.00517.62
8.1.160.0030.00319.05
8.1.150.0000.00718.72
8.1.140.0000.00717.64
8.1.130.0030.00319.05
8.1.120.0030.00617.59
8.1.110.0100.00717.64
8.1.100.0070.00417.58
8.1.90.0110.00017.57
8.1.80.0060.00617.50
8.1.70.0060.00817.62
8.1.60.0140.00417.70
8.1.50.0100.00817.70
8.1.40.0140.00517.65
8.1.30.0180.00017.80
8.1.20.0060.01217.80
8.1.10.0150.00317.61
8.1.00.0000.01817.56
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0050.00318.43
8.0.270.0070.00017.34
8.0.260.0030.00318.53
8.0.250.0000.00717.10
8.0.240.0120.00417.09
8.0.230.0050.01016.96
8.0.220.0080.00616.88
8.0.210.0090.00616.98
8.0.200.0110.00316.91
8.0.190.0080.00817.02
8.0.180.0110.00516.88
8.0.170.0110.00417.01
8.0.160.0140.00017.07
8.0.150.0150.00016.89
8.0.140.0120.00416.98
8.0.130.0000.01517.02
8.0.120.0120.00316.78
8.0.110.0100.00517.00
8.0.100.0140.00017.00
8.0.90.0070.00717.05
8.0.80.0090.00617.05
8.0.70.0090.00916.97
8.0.60.0000.01416.86
8.0.50.0120.00216.79
8.0.30.0070.00716.86
8.0.20.0040.01117.10
8.0.10.0140.00017.18
7.4.330.0000.00515.55
7.4.320.0030.00316.71
7.4.300.0050.01016.71
7.4.290.0000.01516.72
7.4.280.0140.00316.69
7.4.270.0040.01216.76
7.4.260.0080.00816.66
7.4.250.0160.00016.76
7.4.240.0110.00416.52
7.4.230.0000.01616.75
7.4.220.0110.00316.70
7.4.210.0050.01016.78
7.4.200.0100.00316.69
7.4.190.0040.01116.72
7.4.180.0090.00416.79
7.4.160.0110.00416.72
7.4.150.0140.00016.61
7.4.140.0140.00016.76
7.4.130.0120.00316.70
7.4.120.0110.00316.66
7.4.110.0110.00416.73
7.4.100.0090.00616.84
7.4.90.0040.00416.60
7.4.80.0020.00516.53
7.4.70.0050.00216.76
7.4.60.0020.00616.72
7.4.50.0000.00716.65
7.4.40.0070.00516.59
7.4.30.0080.00516.57
7.4.20.0110.00416.63
7.4.10.0070.00716.52
7.4.00.0060.00916.54

preferences:
35.73 ms | 403 KiB | 5 Q