3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "{uuid}/{filename}"; $data = array("uuid" => "derp", "filename" => "foo"); foreach ($data as $key => $val){ echo "{".$key."}"; str_replace($key, "{".$key."}", $string); } echo $string;

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.0070.00718.56
8.3.50.0060.01122.05
8.3.40.0150.00018.70
8.3.30.0090.00619.14
8.3.20.0070.00020.30
8.3.10.0000.00722.08
8.3.00.0040.00422.52
8.2.180.0110.00416.32
8.2.170.0100.01022.96
8.2.160.0030.01420.44
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00019.25
8.2.110.0090.00022.26
8.2.100.0110.00317.91
8.2.90.0050.00219.08
8.2.80.0000.00818.04
8.2.70.0030.00517.50
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0020.00518.16
8.2.30.0000.01018.02
8.2.20.0070.00017.77
8.2.10.0040.00419.40
8.2.00.0030.00617.73
8.1.280.0040.01425.92
8.1.270.0080.00021.89
8.1.260.0000.00726.35
8.1.250.0070.00728.09
8.1.240.0040.00423.96
8.1.230.0040.00719.23
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0110.00017.23
8.1.190.0000.00817.43
8.1.180.0000.00818.80
8.1.170.0040.00418.49
8.1.160.0030.00322.14
8.1.150.0040.00418.70
8.1.140.0040.00417.51
8.1.130.0040.00417.79
8.1.120.0030.00317.47
8.1.110.0000.00717.47
8.1.100.0020.00517.38
8.1.90.0020.00517.45
8.1.80.0040.00417.44
8.1.70.0000.00717.35
8.1.60.0070.00417.58
8.1.50.0060.00317.50
8.1.40.0040.00417.48
8.1.30.0040.00417.60
8.1.20.0030.00517.68
8.1.10.0040.00417.38
8.1.00.0030.00617.43
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0040.00418.36
8.0.270.0000.00817.25
8.0.260.0030.00316.86
8.0.250.0040.00416.94
8.0.240.0000.00716.86
8.0.230.0000.00716.84
8.0.220.0040.00416.96
8.0.210.0030.00316.94
8.0.200.0000.00616.90
8.0.190.0050.00316.92
8.0.180.0040.00416.88
8.0.170.0060.00316.91
8.0.160.0000.00716.83
8.0.150.0030.00316.90
8.0.140.0000.00816.85
8.0.130.0060.00013.31
8.0.120.0000.00816.90
8.0.110.0050.00316.86
8.0.100.0040.00416.80
8.0.90.0000.00816.88
8.0.80.0090.00616.95
8.0.70.0040.00416.84
8.0.60.0050.00316.87
8.0.50.0040.00416.77
8.0.30.0120.01117.21
8.0.20.0090.00917.40
8.0.10.0040.00416.90
8.0.00.0110.00816.79
7.4.330.0000.00615.00
7.4.320.0030.00316.52
7.4.300.0000.00616.51
7.4.290.0000.00716.57
7.4.280.0030.00516.54
7.4.270.0030.00316.61
7.4.260.0030.00316.58
7.4.250.0000.00716.46
7.4.240.0000.00716.59
7.4.230.0000.00716.68
7.4.220.0070.01116.50
7.4.210.0090.00616.52
7.4.200.0000.00716.50
7.4.190.0000.00816.66
7.4.160.0060.01016.68
7.4.150.0130.00317.40
7.4.140.0080.00917.86
7.4.130.0080.01116.50
7.4.120.0120.00616.53
7.4.110.0000.01716.42
7.4.100.0140.00416.32
7.4.90.0110.00616.35
7.4.80.0100.01019.39
7.4.70.0090.00616.40
7.4.60.0130.00416.27
7.4.50.0000.00816.41
7.4.40.0040.01522.77
7.4.30.0090.00616.47
7.4.00.0090.00615.10
7.3.330.0020.00213.14
7.3.320.0030.00313.06
7.3.310.0030.00316.22
7.3.300.0000.00616.31
7.3.290.0100.00316.26
7.3.280.0110.00716.31
7.3.270.0080.00817.40
7.3.260.0040.01316.30
7.3.250.0090.01116.44
7.3.240.0100.00616.22
7.3.230.0110.01116.58
7.3.210.0030.01416.26
7.3.200.0120.00919.39
7.3.190.0070.01316.56
7.3.180.0030.01316.48
7.3.170.0100.00716.54
7.3.160.0140.00416.45
7.3.120.0100.00314.68
7.2.330.0150.00316.64
7.2.320.0070.01116.72
7.2.310.0150.00616.67
7.2.300.0060.01116.61
7.2.290.0080.00816.47
7.2.00.0040.00719.38
7.1.100.0110.01318.14
7.1.70.0070.00017.09
7.1.60.0060.01619.82
7.1.50.0070.01717.02
7.1.00.0070.07022.43
7.0.200.0030.00516.82
7.0.140.0070.07022.15
7.0.60.0030.08719.92
7.0.50.0030.05317.79
7.0.40.0100.08320.03
7.0.30.0270.04720.02
7.0.20.0130.04720.34
7.0.10.0200.04320.06
7.0.00.0170.06320.04
5.6.280.0000.07720.90
5.6.210.0170.07020.45
5.6.200.0030.04318.09
5.6.190.0130.06320.80
5.6.180.4100.04320.32
5.6.170.0270.04320.61
5.6.160.0070.04720.44
5.6.150.0070.08718.22
5.6.140.0000.08018.21
5.6.130.0070.04718.11
5.6.120.0070.05321.04
5.6.110.0100.05321.11
5.6.100.0100.03321.05
5.6.90.0100.06721.11
5.6.80.0070.05720.35
5.6.70.0430.06320.36
5.5.350.0030.07020.46
5.5.340.0070.06017.98
5.5.330.0100.07320.21
5.5.320.0130.05020.16
5.5.310.0170.04320.24
5.5.300.0100.07717.98
5.5.290.0000.04317.92
5.5.280.0070.08020.86
5.5.270.0030.09020.75
5.5.260.0030.04020.86
5.5.250.0030.08720.77
5.5.240.0030.05320.25
5.4.450.0530.05719.32
5.4.440.0530.06019.58
5.4.430.0070.06019.49
5.4.420.0170.05019.32
5.4.410.0130.05019.38
5.4.400.1600.00018.51
5.4.390.0630.00018.77
5.4.380.0330.05318.71
5.4.370.0070.06018.67
5.4.360.0230.05318.77
5.4.350.0270.04318.70
5.4.340.0200.05018.80
5.4.320.0070.03512.45
5.4.310.0050.03812.45
5.4.300.0060.03512.46
5.4.290.0050.03812.45
5.4.280.0100.03212.35
5.4.270.0000.06018.65
5.4.260.0100.08318.78
5.4.250.0200.06718.81
5.4.240.0100.07318.74
5.4.230.0100.05718.90
5.4.220.0130.06319.02
5.4.210.0200.06718.99
5.4.200.0130.04318.87
5.4.190.0100.05719.02
5.4.180.0130.04719.01
5.4.170.0070.05719.03
5.4.160.0100.06318.65
5.4.150.0130.04718.78
5.4.140.0100.05316.41
5.4.130.0200.06316.26
5.4.120.0170.06316.25
5.4.110.0130.05016.52
5.4.100.0100.05316.36
5.4.90.0170.06316.20
5.4.80.0200.06016.38
5.4.70.0230.04016.32
5.4.60.0170.05316.32
5.4.50.0070.04716.40
5.4.40.0100.04716.51
5.4.30.0070.07716.41
5.4.20.0230.05716.46
5.4.10.0100.05716.31
5.4.00.0200.04315.68
5.3.290.0070.03912.80
5.3.280.0030.05714.60
5.3.270.0030.06714.61
5.3.260.0130.05014.61
5.3.250.0170.06014.47
5.3.240.0070.07714.49
5.3.230.0170.04314.70
5.3.220.0230.06014.48
5.3.210.0130.07714.40
5.3.200.0200.06014.28
5.3.190.0070.05314.45
5.3.180.0170.04714.47
5.3.170.0100.05714.71
5.3.160.0270.04014.43
5.3.150.0100.05014.41
5.3.140.0100.05014.55
5.3.130.0070.06014.55
5.3.120.0000.06714.46
5.3.110.0100.05014.55
5.3.100.0030.05313.91
5.3.90.0170.06313.79
5.3.80.0100.05714.17
5.3.70.0170.07013.87
5.3.60.0270.05313.83
5.3.50.0130.04713.90
5.3.40.0070.05313.64
5.3.30.0130.05314.06
5.3.20.0170.04013.70
5.3.10.0170.05713.52
5.3.00.0030.06713.66
5.2.170.0200.03011.23
5.2.160.0030.06311.23
5.2.150.0070.05711.14
5.2.140.0100.05011.05
5.2.130.0170.05010.98
5.2.120.0170.04711.11
5.2.110.0070.05011.10
5.2.100.0100.03711.21
5.2.90.0070.04310.93
5.2.80.0070.05710.99
5.2.70.0100.05011.00
5.2.60.0070.04311.05
5.2.50.0000.04710.91
5.2.40.0170.03310.88
5.2.30.0200.04310.98
5.2.20.0100.03710.96
5.2.10.0070.04710.76
5.2.00.0070.04710.78
5.1.60.0270.01310.23
5.1.50.0030.04010.19
5.1.40.0030.0509.75
5.1.30.0000.05310.38
5.1.20.0000.06010.29
5.1.10.0030.05310.16
5.1.00.0030.04010.00
5.0.50.0070.0378.63
5.0.40.0000.0438.46
5.0.30.0100.0538.25
5.0.20.0030.0308.23
5.0.10.0130.0308.14
5.0.00.0070.0538.34
4.4.90.0070.0307.22
4.4.80.0070.0207.22
4.4.70.0030.0237.23
4.4.60.0030.0377.23
4.4.50.0070.0207.23
4.4.40.0000.0377.23
4.4.30.0130.0237.23
4.4.20.0000.0337.23
4.4.10.0030.0337.23
4.4.00.0030.0437.23
4.3.110.0000.0377.23
4.3.100.0030.0237.23
4.3.90.0030.0277.23
4.3.80.0100.0277.23
4.3.70.0030.0207.23
4.3.60.0030.0307.23
4.3.50.0030.0337.23
4.3.40.0000.0477.23
4.3.30.0000.0337.23
4.3.20.0070.0237.23
4.3.10.0030.0277.23
4.3.00.0100.0237.22

preferences:
40.76 ms | 401 KiB | 5 Q