3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = array( ' ', 'ą', 'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ż', 'ź', 'Ą', 'Ć', 'Ę', 'Ł', 'Ń', 'Ó', 'Ś', 'Ż', 'Ź', ); $replace = array( '-', 'a', 'c', 'e', 'l', 'n', 'o', 's', 'z', 'z', 'A', 'C', 'E', 'L', 'N', 'O', 'S', 'Z', 'Z', ); $str = 'Zażółć gęślą jaźń pupo 010241 90Ś '; $str = str_replace($search, $replace, $str); echo $str;

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0030.01216.56
7.3.00.0090.00616.57
7.2.130.0030.00916.84
7.2.120.0050.00716.76
7.2.110.0060.00816.47
7.2.100.0100.00316.57
7.2.90.0060.00816.67
7.2.80.0090.00616.68
7.2.70.0070.00716.73
7.2.60.0050.00816.77
7.2.50.0070.00716.88
7.2.40.0100.00516.68
7.2.30.0060.00916.98
7.2.20.0030.00916.82
7.2.10.0060.00616.67
7.2.00.0060.00617.54
7.1.250.0030.00615.94
7.1.240.0130.00015.70
7.1.230.0040.00815.60
7.1.220.0000.01315.69
7.1.210.0060.00615.77
7.1.200.0030.00815.56
7.1.190.0040.00915.57
7.1.180.0040.01115.56
7.1.170.0070.00315.69
7.1.160.0040.00415.74
7.1.150.0000.00915.82
7.1.140.0060.00615.77
7.1.130.0030.01015.94
7.1.120.0070.00715.92
7.1.110.0100.00315.87
7.1.100.0100.00617.09
7.1.90.0080.00315.58
7.1.80.0070.00715.75
7.1.70.0040.00616.28
7.1.60.0090.01017.62
7.1.50.0080.00716.13
7.1.40.0040.00415.83
7.1.30.0060.00615.62
7.1.20.0060.00615.80
7.1.10.0070.00415.89
7.1.00.0070.04018.98
7.0.320.0070.00415.13
7.0.310.0030.01015.59
7.0.300.0100.00315.47
7.0.290.0100.00015.43
7.0.280.0090.00615.12
7.0.270.0030.01015.58
7.0.260.0040.01115.42
7.0.250.0060.00615.38
7.0.240.0060.00615.19
7.0.230.0040.00415.41
7.0.220.0070.00415.54
7.0.210.0070.00715.13
7.0.200.0330.01014.96
7.0.190.0060.00315.38
7.0.180.0060.00915.30
7.0.170.0040.00715.19
7.0.160.0120.00015.60
7.0.150.0100.00315.47
7.0.140.0100.03618.77
7.0.130.0130.00015.59
7.0.120.0030.00915.36
7.0.110.0090.00615.32
7.0.100.0090.00314.99
7.0.90.0090.00315.38
7.0.80.0070.00315.48
7.0.70.0030.00715.09
7.0.60.0100.03517.59
7.0.50.0050.03216.56
7.0.40.0070.03416.90
7.0.30.0150.02516.60
7.0.20.0120.02416.76
7.0.10.0150.03016.73
7.0.00.0080.02216.98
hhvm-3.22.00.0430.11690.51
hhvm-3.21.30.0580.12690.69
hhvm-3.21.00.0520.13190.40
hhvm-3.20.20.0490.11889.93
hhvm-3.19.20.0400.11889.50
hhvm-3.18.50.0530.10488.32
hhvm-3.18.40.0340.12388.89
hhvm-3.17.30.0450.10487.56
hhvm-3.15.40.0340.10885.15
hhvm-3.13.20.0640.08796.72
hhvm-3.12.140.0510.10294.98
hhvm-3.11.10.0440.10787.45
hhvm-3.10.10.0530.09984.31
5.6.380.0000.01214.34
5.6.370.0120.00314.57
5.6.360.0070.00614.39
5.6.350.0070.00714.20
5.6.340.0040.01114.66
5.6.330.0040.01213.97
5.6.320.0060.00314.29
5.6.310.0060.00614.43
5.6.300.0000.00914.20
5.6.290.0000.01314.41
5.6.280.0120.03517.72
5.6.270.0090.00314.25
5.6.260.0000.01414.26
5.6.250.0060.00614.59
5.6.240.0000.01313.98
5.6.230.0060.00914.71
5.6.220.0040.00814.39
5.6.210.0070.02317.35
5.6.200.0040.04516.35
5.6.190.0050.04717.41
5.6.180.0170.03917.52
5.6.170.0180.04117.29
5.6.160.0080.02317.32
5.6.150.0020.02716.22
5.6.140.0000.04016.20
5.6.130.0030.04016.15
5.6.120.0110.03017.67
5.6.110.0050.04417.60
5.6.100.0050.03917.69
5.6.90.0050.02317.70
5.6.80.0050.04317.21
5.6.70.0180.03617.38
5.6.60.0000.00814.04
5.6.50.0070.00713.91
5.6.40.0000.01014.21
5.6.30.0080.00414.09
5.6.20.0040.00414.31
5.6.10.0100.00314.46
5.6.00.0030.01014.05
5.5.380.0080.00311.07
5.5.370.0030.00311.20
5.5.360.0030.00311.07
5.5.350.0100.04315.77
5.5.340.0050.04314.54
5.5.330.0050.03415.62
5.5.320.0030.03215.68
5.5.310.0100.02115.60
5.5.300.0100.03914.58
5.5.290.0080.02514.47
5.5.280.0080.03615.90
5.5.270.0090.02716.02
5.5.260.0030.02115.95
5.5.250.0040.02215.89
5.5.240.0000.04115.62
5.5.230.0080.00011.07
5.5.220.0000.01111.07
5.5.210.0030.00911.07
5.5.200.0000.01211.07
5.5.190.0040.00711.07
5.5.180.0000.01211.10
5.5.170.0060.00914.26
5.5.160.0000.00911.07
5.5.150.0070.00411.09
5.5.140.0020.00211.07
5.5.130.0000.00711.07
5.5.120.0070.00411.12
5.5.110.0030.01011.07
5.5.100.0070.00311.21
5.5.90.0060.00311.07
5.5.80.0000.01111.07
5.5.70.0070.00411.07
5.5.60.0030.00511.07
5.5.50.0040.00811.07
5.5.40.0030.00311.17
5.5.30.0030.00711.13
5.5.20.0070.00311.07
5.5.10.0060.00611.07
5.5.00.0000.00611.07
5.4.450.0400.04015.37
5.4.440.0500.03515.27
5.4.430.0490.03315.35
5.4.420.0050.03515.32
5.4.410.0470.03315.02
5.4.400.0130.03114.92
5.4.390.0170.02814.88
5.4.380.0170.02514.87
5.4.370.0130.03014.76
5.4.360.0210.03514.82
5.4.350.0170.03714.87
5.4.340.0120.03314.91
5.4.330.0030.00611.07
5.4.320.0170.02714.70
5.4.310.0120.02914.87
5.4.300.0060.03314.83
5.4.290.0230.03214.87
5.4.280.0140.02814.91
5.4.270.0130.03214.87
5.4.260.0130.03214.79
5.4.250.0130.03014.81
5.4.240.0120.03614.88
5.4.230.0120.02714.87
5.4.220.0140.02814.83
5.4.210.0080.03314.81
5.4.200.0130.02413.78
5.4.190.0130.02714.81
5.4.180.0170.02514.86
5.4.170.0100.03314.88
5.4.160.0100.03214.86
5.4.150.0180.02314.86
5.4.140.0170.02413.56
5.4.130.0150.02813.63
5.4.120.0190.02713.67
5.4.110.0150.03213.71
5.4.100.0150.03113.62
5.4.90.0100.03613.61
5.4.80.0100.03313.62
5.4.70.0150.03013.56
5.4.60.0130.02813.62
5.4.50.0100.02813.54
5.4.40.0160.02513.67
5.4.30.0160.02213.68
5.4.20.0150.02713.65
5.4.10.0100.02913.58
5.4.00.0110.02513.34
5.3.290.0150.02712.87
5.3.280.0140.02512.85
5.3.270.0080.03112.88
5.3.260.0120.03012.83
5.3.250.0160.03612.79
5.3.240.0160.02312.86
5.3.230.0110.03512.83
5.3.220.0100.03312.77
5.3.210.0130.03012.77
5.3.200.0180.02512.85
5.3.190.0120.03312.82
5.3.180.0050.03712.77
5.3.170.0160.02812.84
5.3.160.0130.03712.76
5.3.150.0140.03512.86
5.3.140.0150.02512.80
5.3.130.0130.03012.79
5.3.120.0170.03512.80
5.3.110.0180.03012.79
5.3.100.0070.03712.54
5.3.90.0090.03412.50
5.3.80.0200.03012.49
5.3.70.0190.03012.52
5.3.60.0150.02812.54
5.3.50.0160.02312.45
5.3.40.0100.03012.55
5.3.30.0080.02812.48
5.3.20.0080.03012.37
5.3.10.0130.02612.32
5.3.00.0140.02812.40
5.2.170.0140.01811.11
5.2.160.0130.02611.09
5.2.150.0070.02711.18
5.2.140.0100.02511.17
5.2.130.0100.02511.06
5.2.120.0100.02311.05
5.2.110.0080.02511.12
5.2.100.0080.02511.12
5.2.90.0080.02611.11
5.2.80.0070.02511.12
5.2.70.0100.02311.10
5.2.60.0080.02311.12
5.2.50.0070.02711.07
5.2.40.0100.02011.04
5.2.30.0080.02311.04
5.2.20.0170.02011.09
5.2.10.0080.02111.02
5.2.00.0100.02510.96
5.1.60.0120.02010.51
5.1.50.0130.01510.59
5.1.40.0070.02010.58
5.1.30.0070.02210.77
5.1.20.0140.01510.72
5.1.10.0070.02010.56
5.1.00.0070.02010.58
5.0.50.0050.0189.87
5.0.40.0000.0209.79
5.0.30.0050.0279.63
5.0.20.0030.0179.65
5.0.10.0050.0159.71
5.0.00.0080.0229.65
4.4.90.0050.0118.50
4.4.80.0120.0078.50
4.4.70.0030.0158.50
4.4.60.0030.0158.47
4.4.50.0020.0158.48
4.4.40.0030.0228.45
4.4.30.0050.0138.49
4.4.20.0020.0178.50
4.4.10.0030.0178.50
4.4.00.0070.0228.49
4.3.110.0020.0168.45
4.3.100.0070.0108.43
4.3.90.0030.0158.43
4.3.80.0050.0188.44
4.3.70.0070.0108.46
4.3.60.0070.0108.45
4.3.50.0050.0148.46
4.3.40.0060.0188.48
4.3.30.0000.0177.83
4.3.20.0030.0137.83
4.3.10.0050.0107.85
4.3.00.0080.0178.94