3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'This thing should output _$this_key$_ and also _$this_one$_ so that I can match it with an array!'; $replacements = [ 'this_key' => 'love', 'this_one' => 'more love' ]; $start = '_$'; $end = '$_'; $replacements = array_combine(array_map(function ($v) use ($start, $end) { return "$start$v$end"; }, array_keys($replacements)), $replacements); echo strtr($str, $replacements);

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.00717.64
8.4.130.0130.00819.39
8.4.120.0140.00720.65
8.4.110.0080.00418.54
8.4.100.0110.00917.71
8.4.90.0100.01018.64
8.4.80.0090.00317.60
8.4.70.0130.00717.72
8.4.60.0100.00920.49
8.4.50.0120.00817.75
8.4.40.0000.00819.46
8.4.30.0080.00320.42
8.4.20.0140.00720.51
8.4.10.0080.00017.35
8.3.270.0110.00816.80
8.3.260.0140.00516.85
8.3.250.0120.00616.98
8.3.240.0060.00216.72
8.3.230.0040.00416.42
8.3.220.0130.00617.20
8.3.210.0090.00416.52
8.3.200.0040.00516.66
8.3.190.0100.00917.13
8.3.180.0140.00516.36
8.3.170.0060.01217.00
8.3.160.0100.01016.43
8.3.150.0120.00620.93
8.3.140.0160.00316.71
8.3.130.0080.00018.46
8.3.120.0030.01219.00
8.3.110.0040.00420.94
8.3.100.0040.00424.06
8.3.90.0040.01426.77
8.3.80.0050.00516.40
8.3.70.0090.00518.15
8.3.60.0110.01118.18
8.3.50.0130.00523.72
8.3.40.0000.01618.48
8.3.30.0000.01618.64
8.3.20.0060.00320.77
8.3.10.0060.00321.69
8.3.00.0050.00323.65
8.2.290.0130.00620.66
8.2.280.0050.00418.38
8.2.270.0160.00317.25
8.2.260.0130.00618.78
8.2.250.0110.00418.39
8.2.240.0080.00818.83
8.2.230.0030.00722.58
8.2.220.0040.00737.54
8.2.210.0040.01126.77
8.2.200.0030.00616.50
8.2.190.0060.00916.63
8.2.180.0100.01016.63
8.2.170.0070.01422.96
8.2.160.0100.00320.53
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0090.00021.11
8.2.100.0070.00417.72
8.2.90.0000.00817.97
8.2.80.0030.00518.93
8.2.70.0050.00317.63
8.2.60.0030.00518.05
8.2.50.0040.00418.07
8.2.40.0050.00218.16
8.2.30.0000.00718.13
8.2.20.0040.00418.07
8.2.10.0040.00419.31
8.2.00.0000.00719.38
8.1.330.0110.00721.85
8.1.320.0130.00615.91
8.1.310.0130.00616.57
8.1.300.0110.00717.89
8.1.290.0000.01018.88
8.1.280.0090.00625.92
8.1.270.0040.00422.10
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.92
8.1.230.0100.00020.89
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0050.00517.00
8.1.190.0000.00917.35
8.1.180.0060.00318.10
8.1.170.0080.00018.57
8.1.160.0040.00418.89
8.1.150.0070.00019.03
8.1.140.0070.00020.82
8.1.130.0030.00517.44
8.1.120.0070.00317.53
8.1.110.0040.00417.46
8.1.100.0000.00817.36
8.1.90.0040.00417.34
8.1.80.0040.00417.46
8.1.70.0070.00017.35
8.1.60.0030.00517.59
8.1.50.0030.00617.54
8.1.40.0060.00317.46
8.1.30.0000.00917.59
8.1.20.0040.00417.57
8.1.10.0100.00917.55
8.1.00.0140.00417.37
8.0.300.0000.00819.99
8.0.290.0040.00416.63
8.0.280.0040.00418.48
8.0.270.0000.00717.92
8.0.260.0060.00016.82
8.0.250.0000.00716.89
8.0.240.0060.00016.87
8.0.230.0070.00016.84
8.0.220.0070.00016.82
8.0.210.0000.00616.96
8.0.200.0030.00317.01
8.0.190.0040.00416.84
8.0.180.0000.00916.80
8.0.170.0040.00416.95
8.0.160.0040.00416.77
8.0.150.0040.00416.93
8.0.140.0050.00516.78
8.0.130.0030.00815.11
8.0.120.0110.00216.86
8.0.110.0070.00616.81
8.0.100.0080.00516.82
8.0.90.0100.00516.93
8.0.80.0110.00716.86
8.0.70.0110.00216.87
8.0.60.0050.00716.90
8.0.50.0070.00716.78
8.0.30.0110.00916.99
8.0.20.0100.00716.94
8.0.10.0190.01016.90
8.0.00.0170.00716.95
7.4.330.0030.00316.66
7.4.320.0000.00616.49
7.4.300.0030.00316.62
7.4.290.0040.00416.50
7.4.280.0040.00416.59
7.4.270.0110.00316.52
7.4.260.0100.00314.83
7.4.250.0070.00716.43
7.4.240.0060.00616.51
7.4.230.0090.00616.54
7.4.220.0060.00516.39
7.4.210.0110.00616.57
7.4.200.0100.00316.39
7.4.190.0190.00016.55
7.4.180.0160.00316.56
7.4.160.0180.00616.52
7.4.150.0180.00416.46
7.4.140.0150.00916.42
7.4.130.0130.00616.41
7.4.120.0120.00816.55
7.4.110.0110.00916.38
7.4.100.0160.00516.39
7.4.90.0150.00816.49
7.4.80.0150.00917.42
7.4.70.0130.00416.42
7.4.60.0110.00516.42
7.4.50.0090.00716.41
7.4.40.0140.00916.43
7.4.30.0190.00816.42
7.4.20.0170.00616.47
7.4.10.0140.00816.36
7.4.00.0090.00916.46
7.3.330.0090.00516.25
7.3.320.0070.00314.78
7.3.310.0110.00216.26
7.3.300.0110.00216.37
7.3.290.0100.00616.33
7.3.280.0140.00516.37
7.3.270.0160.00616.45
7.3.260.0150.01016.26
7.3.250.0160.00916.36
7.3.240.0100.01016.46
7.3.230.0160.00816.44
7.3.220.0220.00816.29
7.3.210.0170.00716.34
7.3.200.0130.00916.51
7.3.190.0170.00816.25
7.3.180.0110.00916.26
7.3.170.0100.01116.36
7.3.160.0130.00816.29
7.3.150.0150.00916.31
7.3.140.0190.00816.28
7.3.130.0130.01016.28
7.3.120.0150.00816.48
7.3.110.0120.01016.19
7.3.100.0130.00816.33
7.3.90.0160.00616.35
7.3.80.0170.00616.34
7.3.70.0130.00916.31
7.3.60.0130.00916.34
7.3.50.0160.00616.23
7.3.40.0130.00616.37
7.3.30.0110.01016.33
7.3.20.0130.00916.71
7.3.10.0140.00816.77
7.3.00.0160.00716.76
7.2.340.0150.01016.27
7.2.330.0150.00516.57
7.2.320.0170.00516.42
7.2.310.0120.00716.43
7.2.300.0140.00616.62
7.2.290.0120.01116.56
7.2.280.0140.01216.57
7.2.270.0160.00816.37
7.2.260.0150.00716.54
7.2.250.0140.00816.43
7.2.240.0140.00816.55
7.2.230.0110.01216.38
7.2.220.0160.00516.47
7.2.210.0140.00816.42
7.2.200.0130.01116.44
7.2.190.0130.00816.59
7.2.180.0160.00516.53
7.2.170.0150.00716.59
7.2.160.0170.00516.51
7.2.150.0150.00717.05
7.2.140.0140.01016.98
7.2.130.0150.00816.96
7.2.120.0160.00716.98
7.2.110.0130.00817.09
7.2.100.0180.01017.08
7.2.90.0150.00716.94
7.2.80.0110.01117.04
7.2.70.0140.00816.98
7.2.60.0140.00716.99
7.2.50.0130.01016.97
7.2.40.0140.01017.05
7.2.30.0140.00816.92
7.2.20.0120.00817.05
7.2.10.0190.01117.00
7.2.00.0100.01017.08

preferences:
137.68 ms | 403 KiB | 5 Q