3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'A B C ()'; $str = preg_replace(\s[^a-zA-Z], '_', $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).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.260.0070.03612.37
5.4.250.0040.03912.38
5.4.240.0010.04112.37
5.4.230.0070.04012.37
5.4.220.0070.03712.37
5.4.210.0080.03312.36
5.4.200.0070.03712.37
5.4.190.0070.03912.36
5.4.180.0070.04312.36
5.4.170.0050.04512.37
5.4.160.0080.04112.36
5.4.150.0070.03612.36
5.4.140.0050.04812.05
5.4.130.0090.03912.03
5.4.120.0090.03511.99
5.4.110.0050.03711.99
5.4.100.0030.03912.00
5.4.90.0060.03611.99
5.4.80.0060.03911.99
5.4.70.0110.03211.98
5.4.60.0040.03611.98
5.4.50.0040.03911.99
5.4.40.0040.03711.98
5.4.30.0030.04011.97
5.4.20.0090.04611.97
5.4.10.0130.05211.97
5.4.00.0080.05311.46
5.3.280.0060.04512.71
5.3.270.0100.03612.72
5.3.260.0070.03812.72
5.3.250.0100.04012.71
5.3.240.0050.03812.72
5.3.230.0100.03412.71
5.3.220.0070.03912.68
5.3.210.0040.04112.68
5.3.200.0080.03512.68
5.3.190.0070.03712.68
5.3.180.0060.03712.68
5.3.170.0090.03612.67
5.3.160.0130.03812.67
5.3.150.0090.03712.68
5.3.140.0030.04212.66
5.3.130.0050.04012.66
5.3.120.0040.04212.65
5.3.110.0060.04012.66
5.3.100.0080.03412.12
5.3.90.0060.03512.09
5.3.80.0040.03912.07
5.3.70.0040.03812.08
5.3.60.0070.04012.06
5.3.50.0090.03812.00
5.3.40.0090.04212.00
5.3.30.0100.03411.94
5.3.20.0090.05411.71
5.3.10.0070.04411.66
5.3.00.0060.04211.65
5.2.170.0090.0279.14
5.2.160.0040.0319.14
5.2.150.0020.0399.14
5.2.140.0040.0339.14
5.2.130.0040.0309.10
5.2.120.0040.0309.10
5.2.110.0040.0309.11
5.2.100.0070.0279.11
5.2.90.0030.0309.10
5.2.80.0030.0329.09
5.2.70.0030.0339.09
5.2.60.0070.0299.05
5.2.50.0030.0359.02
5.2.40.0070.0368.99
5.2.30.0050.0428.97
5.2.20.0070.0288.95
5.2.10.0040.0298.88
5.2.00.0080.0268.74
5.1.60.0030.0268.03
5.1.50.0040.0258.02
5.1.40.0040.0248.02
5.1.30.0030.0268.36
5.1.20.0010.0298.38
5.1.10.0030.0278.11
5.1.00.0050.0258.11
5.0.50.0050.0196.58
5.0.40.0050.0176.44
5.0.30.0030.0316.26
5.0.20.0010.0226.23
5.0.10.0050.0186.21
5.0.00.0020.0346.20
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0030.0154.75
4.4.60.0040.0144.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0030.0154.76
4.4.20.0020.0174.85
4.4.10.0080.0144.85
4.4.00.0060.0274.75
4.3.110.0020.0174.67
4.3.100.0030.0154.66
4.3.90.0060.0174.63
4.3.80.0010.0254.59
4.3.70.0040.0154.63
4.3.60.0030.0164.63
4.3.50.0020.0184.63
4.3.40.0070.0244.54
4.3.30.0030.0173.27
4.3.20.0030.0203.25
4.3.10.0040.0213.21
4.3.00.0030.0206.85

preferences:
139.35 ms | 1394 KiB | 7 Q