3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keywords = ['test', 'value']; $replace = array_map(funciton($key) { return '<span>' . $key . '</span>'; }, $keywords); print_r($replace); $string = 'Hello world. This is a test.'; $render = str_replace($keywords, $replace, $string); echo $render;

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)
5.4.260.0130.07318.97
5.4.250.0200.04318.92
5.4.240.0070.07719.09
5.4.230.0200.04018.74
5.4.220.0070.06018.75
5.4.210.0130.04718.86
5.4.200.0030.05319.02
5.4.190.0170.06018.83
5.4.180.0230.05718.78
5.4.170.0030.08318.73
5.4.160.0130.04718.63
5.4.150.0070.05718.63
5.4.140.0170.05016.30
5.4.130.0070.04716.45
5.4.120.0100.05016.38
5.4.110.0070.07316.65
5.4.100.0070.05316.65
5.4.90.0200.04716.63
5.4.80.0200.04016.64
5.4.70.0030.08016.46
5.4.60.0070.07316.26
5.4.50.0230.04016.29
5.4.40.0100.06016.65
5.4.30.0130.06316.61
5.4.20.0170.04016.59
5.4.10.0030.05716.41
5.4.00.0070.06315.79
5.3.280.0100.05314.62
5.3.270.0230.04314.46
5.3.260.0100.07314.60
5.3.250.0100.07014.38
5.3.240.0070.06714.33
5.3.230.0100.05014.62
5.3.220.0070.06014.42
5.3.210.0130.07014.42
5.3.200.0200.05714.57
5.3.190.0100.06314.44
5.3.180.0100.04714.40
5.3.170.0000.06014.56
5.3.160.0030.06314.59
5.3.150.0100.06714.57
5.3.140.0130.06714.44
5.3.130.0100.05714.43
5.3.120.0000.08314.56
5.3.110.0130.07014.56
5.3.100.0030.07314.06
5.3.90.0030.05313.72
5.3.80.0030.05714.07
5.3.70.0100.06713.90
5.3.60.0100.06714.05
5.3.50.0170.05013.83
5.3.40.0070.05013.79
5.3.30.0130.05713.93
5.3.20.0170.06013.71
5.3.10.0030.07313.68
5.3.00.0100.06313.64
5.2.170.0070.05011.13
5.2.160.0030.04311.04
5.2.150.0170.04311.16
5.2.140.0130.06011.05
5.2.130.0070.06011.25
5.2.120.0130.04711.03
5.2.110.0000.05311.10
5.2.100.0030.04311.11
5.2.90.0070.05311.09
5.2.80.0030.05710.92
5.2.70.0000.04711.01
5.2.60.0100.05310.98
5.2.50.0100.05310.78
5.2.40.0070.04010.75
5.2.30.0070.06310.98
5.2.20.0030.05010.93
5.2.10.0130.03310.79
5.2.00.0070.05010.69
5.1.60.0030.0509.92
5.1.50.0130.03710.04
5.1.40.0030.03710.03
5.1.30.0070.03710.27
5.1.20.0070.03710.41
5.1.10.0030.03710.12
5.1.00.0070.03310.12
5.0.50.0070.0378.40
5.0.40.0030.0378.25
5.0.30.0000.0438.41
5.0.20.0100.0208.28
5.0.10.0070.0338.21
5.0.00.0000.0608.34
4.4.90.0030.0237.07
4.4.80.0000.0237.07
4.4.70.0000.0337.07
4.4.60.0030.0207.07
4.4.50.0000.0307.07
4.4.40.0030.0437.07
4.4.30.0000.0237.07
4.4.20.0000.0237.07
4.4.10.0000.0277.07
4.4.00.0100.0407.07
4.3.110.0030.0207.07
4.3.100.0000.0237.07
4.3.90.0070.0237.07
4.3.80.0000.0477.07
4.3.70.0070.0277.07
4.3.60.0000.0237.07
4.3.50.0000.0337.07
4.3.40.0000.0337.07
4.3.30.0000.0237.07
4.3.20.0000.0237.07
4.3.10.0030.0277.07
4.3.00.0070.0237.08

preferences:
141.4 ms | 1394 KiB | 7 Q