3v4l.org

run code in 300+ PHP versions simultaneously
<?php function interpolate($str, $data) { // /var/storage/images/strip/' .$hash . '/tn_' . $n . '.jpg'; array_walk($data, function($value, $key) use (&$str) { $str = str_replace('{{' . $key . '}}', $value, $str); echo $str . PHP_EOL; }); return $str; } $str = '/var/storage/images/strip/{{hash}}/tn_{{n}}.jpg'; echo interpolate($str, array('hash' => '0238de39s82u4d30238de39s82u4d3', 'n' => 1));

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.0140.00718.31
8.3.50.0090.01021.92
8.3.40.0140.00318.88
8.3.30.0070.00718.54
8.3.20.0040.00418.63
8.3.10.0000.00920.95
8.3.00.0070.00021.90
8.2.180.0070.00716.32
8.2.170.0110.00422.96
8.2.160.0170.00320.38
8.2.150.0190.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0030.00620.99
8.2.110.0090.00020.41
8.2.100.0060.00617.78
8.2.90.0000.00819.29
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0060.00321.13
8.2.20.0030.00517.65
8.2.10.0040.00417.71
8.2.00.0030.00617.67
8.1.280.0150.00725.92
8.1.270.0000.00823.99
8.1.260.0070.00726.35
8.1.250.0000.00828.09
8.1.240.0030.00622.48
8.1.230.0110.00020.84
8.1.220.0050.00318.77
8.1.210.0040.00418.81
8.1.200.0090.00017.36
8.1.190.0040.00417.52
8.1.180.0000.00818.10
8.1.170.0030.00518.49
8.1.160.0070.00018.89
8.1.150.0000.00818.68
8.1.140.0040.00417.45
8.1.130.0030.00317.71
8.1.120.0040.00417.52
8.1.110.0000.00717.49
8.1.100.0000.00717.41
8.1.90.0000.00717.41
8.1.80.0000.00717.41
8.1.70.0000.00717.40
8.1.60.0110.00017.51
8.1.50.0000.00717.38
8.1.40.0030.00517.50
8.1.30.0040.00417.55
8.1.20.0070.00017.67
8.1.10.0040.00417.40
8.1.00.0060.00317.45
8.0.300.0070.00019.98
8.0.290.0030.00317.18
8.0.280.0000.00718.32
8.0.270.0030.00317.18
8.0.260.0030.00316.83
8.0.250.0040.00417.00
8.0.240.0070.00316.95
8.0.230.0000.00716.85
8.0.220.0060.00016.94
8.0.210.0030.00316.93
8.0.200.0000.00716.84
8.0.190.0030.00417.00
8.0.180.0040.00416.76
8.0.170.0000.00816.96
8.0.160.0000.00716.82
8.0.150.0000.00716.81
8.0.140.0040.00416.74
8.0.130.0000.00513.36
8.0.120.0000.00716.86
8.0.110.0000.00716.77
8.0.100.0000.00816.89
8.0.90.0000.00716.88
8.0.80.0070.00816.93
8.0.70.0040.00416.80
8.0.60.0000.00716.80
8.0.50.0000.00816.82
8.0.30.0160.00717.12
8.0.20.0110.00717.40
8.0.10.0040.00416.96
8.0.00.0120.00816.71
7.4.330.0050.00016.83
7.4.320.0000.00716.38
7.4.300.0030.00316.60
7.4.290.0070.00016.49
7.4.280.0030.00316.39
7.4.270.0060.00016.59
7.4.260.0050.00013.39
7.4.250.0050.00316.46
7.4.240.0080.00016.54
7.4.230.0000.00616.41
7.4.220.0210.01216.59
7.4.210.0110.00816.62
7.4.200.0030.00516.63
7.4.190.0030.00316.75
7.4.160.0100.00516.59
7.4.150.0100.01017.40
7.4.140.0120.00717.86
7.4.130.0090.00816.46
7.4.120.0060.01016.45
7.4.110.0070.01016.35
7.4.100.0070.01016.29
7.4.90.0090.00916.42
7.4.80.0100.00619.39
7.4.70.0030.01416.54
7.4.60.0100.00616.48
7.4.50.0000.00916.54
7.4.40.0030.01022.77
7.4.30.0100.00716.69
7.4.00.0070.01014.88
7.3.330.0020.00213.25
7.3.320.0030.00313.32
7.3.310.0000.00716.16
7.3.300.0030.00316.25
7.3.290.0140.00416.32
7.3.280.0090.00916.31
7.3.270.0100.00717.40
7.3.260.0090.01018.24
7.3.250.0120.00716.46
7.3.240.0080.00816.48
7.3.230.0090.00916.39
7.3.210.0060.01216.40
7.3.200.0030.01919.39
7.3.190.0000.01616.41
7.3.180.0150.00316.60
7.3.170.0100.01216.54
7.3.160.0100.00716.47
7.3.120.0110.00315.09
7.2.330.0100.00716.67
7.2.320.0060.01216.29
7.2.310.0060.01616.46
7.2.300.0030.01416.73
7.2.290.0140.00316.74
7.2.00.0040.00819.52
7.1.100.0000.00918.34
7.1.70.0040.00717.25
7.1.60.0120.01219.40
7.1.50.0130.01317.06
7.1.00.0100.06022.46
7.0.200.0040.00416.58
7.0.140.0030.07022.09
7.0.60.0100.07719.91
7.0.50.0070.06317.95
7.0.40.0070.04320.25
7.0.30.0400.04320.23
7.0.20.0300.08020.19
7.0.10.0070.09020.10
7.0.00.0070.05320.10
5.6.280.0070.06721.02
5.6.210.0000.05720.72
5.6.200.0000.08018.16
5.6.190.0030.06320.41
5.6.180.0270.04020.50
5.6.170.0170.04720.46
5.6.160.0030.08720.71
5.6.150.0000.04318.34
5.6.140.0100.07718.22
5.6.130.0030.08718.11
5.6.120.0030.04020.95
5.6.110.0100.06720.98
5.6.100.0070.06321.05
5.6.90.0030.08320.98
5.6.80.0070.06720.39
5.5.350.0070.08320.41
5.5.340.0070.08017.96
5.5.330.0070.06320.28
5.5.320.1630.07320.31
5.5.310.0230.05020.21
5.5.300.0100.07317.96
5.5.290.0000.05317.99
5.5.280.0070.08020.77
5.5.270.0100.08320.67
5.5.260.0100.08320.96
5.5.250.0000.04320.58
5.5.240.0070.06320.27
5.4.450.0600.05019.53
5.4.440.0400.04019.27
5.4.430.0130.04719.16
5.4.420.0530.04019.48
5.4.410.0530.04019.26
5.4.400.0270.07319.22
5.4.390.0530.04719.04
5.4.380.0930.03318.97
5.4.370.0430.02319.20
5.4.360.0870.05319.22
5.4.350.0430.06719.22
5.4.340.0470.05019.13
5.4.320.0900.04319.31
5.4.310.0730.03719.07
5.4.300.0900.03719.21
5.4.290.0730.05718.86
5.4.280.0730.04719.23
5.4.270.0870.05719.04
5.4.260.0630.04719.14
5.4.250.0970.03719.14
5.4.240.0500.07019.21
5.4.230.0830.03019.18
5.4.220.0500.04718.82
5.4.210.0770.06018.82
5.4.200.0930.07019.05
5.4.190.0600.04718.95
5.4.180.0370.04719.21
5.4.170.0430.05719.12
5.4.160.0830.03719.20
5.4.150.0430.04718.81
5.4.140.0930.05016.43
5.4.130.0870.03716.57
5.4.120.0370.03316.39
5.4.110.0530.05316.61
5.4.100.0570.03316.32
5.4.90.0470.05716.50
5.4.80.0600.04016.46
5.4.70.0430.04016.47
5.4.60.0900.03016.41
5.4.50.0730.03316.32
5.4.40.0600.03316.51
5.4.30.0630.04316.48
5.4.20.0670.03016.48
5.4.10.0530.04716.40
5.4.00.0330.04716.25
5.3.290.0470.04716.52
5.3.280.0030.06316.26
5.3.270.0830.06316.25
5.3.260.0570.04316.25
5.3.250.0600.05316.25
5.3.240.0570.04316.25
5.3.230.0900.04716.25
5.3.220.0630.04016.25
5.3.210.0470.04716.25
5.3.200.0370.05316.25
5.3.190.0730.03016.25
5.3.180.0670.03316.25
5.3.170.0800.03316.25
5.3.160.0270.04316.25
5.3.150.0670.03316.25
5.3.140.0870.03716.25
5.3.130.0770.04316.25
5.3.120.0500.04316.25
5.3.110.0570.03716.25
5.3.100.0600.03716.25
5.3.90.0600.04316.24
5.3.80.0630.03316.24
5.3.70.0430.03716.24
5.3.60.0770.02716.24
5.3.50.0930.03016.24
5.3.40.0770.03016.24
5.3.30.0530.03316.24
5.3.20.0500.03316.24
5.3.10.0330.03316.24
5.3.00.0600.04316.24
5.2.170.0300.03016.24
5.2.160.0630.02316.24
5.2.150.0470.02316.24
5.2.140.0500.02716.24
5.2.130.0300.03016.24
5.2.120.0700.03716.24
5.2.110.0770.02316.24
5.2.100.0600.02716.24
5.2.90.0570.03016.24
5.2.80.0530.02316.24
5.2.70.0200.03016.24
5.2.60.0630.03016.24
5.2.50.0330.02316.24
5.2.40.0330.03016.24
5.2.30.0370.03016.24
5.2.20.0170.02716.24
5.2.10.0430.03316.24
5.2.00.0330.02716.24
5.1.60.0370.03016.24
5.1.50.0530.02716.24
5.1.40.0530.02016.24
5.1.30.0600.02716.24
5.1.20.0630.02716.24
5.1.10.0130.02316.24
5.1.00.0400.01716.24
5.0.50.0170.02016.24
5.0.40.0330.02016.24
5.0.30.0100.03316.24
5.0.20.0230.01716.24
5.0.10.0030.01316.24
5.0.00.0270.02716.24
4.4.90.0100.01716.24
4.4.80.0230.01716.24
4.4.70.0230.01716.24
4.4.60.0070.02016.24
4.4.50.0030.02016.24
4.4.40.0200.02316.24
4.4.30.0300.01716.24
4.4.20.0200.02016.24
4.4.10.0200.01316.24
4.4.00.0000.02716.24
4.3.110.0170.01316.24
4.3.100.0100.01716.24
4.3.90.0130.01016.24
4.3.80.0130.03316.24
4.3.70.0170.01716.24
4.3.60.0170.01316.24
4.3.50.0170.01716.24
4.3.40.0170.02316.24
4.3.30.0030.01716.24
4.3.20.0070.02016.24
4.3.10.0070.01316.24
4.3.00.0070.01316.24

preferences:
42.35 ms | 401 KiB | 5 Q