3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($srting) {$string = str_replace(' ', '', $string);return preg_replace('/[^A-Za-z0-9\-]/', '', $string); } echo "wat";

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.310.0050.03912.52
5.4.300.0030.03912.52
5.4.290.0090.03512.51
5.4.280.0080.03312.41
5.4.270.0050.03612.41
5.4.260.0100.03412.41
5.4.250.0040.03912.41
5.4.240.0080.03412.41
5.4.230.0030.04012.40
5.4.220.0050.03712.40
5.4.210.0040.03712.40
5.4.200.0090.04112.40
5.4.190.0040.04012.39
5.4.180.0050.03912.40
5.4.170.0070.03512.41
5.4.160.0070.03812.40
5.4.150.0070.03812.40
5.4.140.0060.03612.09
5.4.130.0050.03712.07
5.4.120.0080.03712.04
5.4.110.0060.03512.03
5.4.100.0090.04112.03
5.4.90.0070.05112.03
5.4.80.0050.03812.03
5.4.70.0080.03312.02
5.4.60.0050.03612.03
5.4.50.0050.03612.03
5.4.40.0090.03512.02
5.4.30.0060.03612.02
5.4.20.0090.03312.01
5.4.10.0060.03412.01
5.4.00.0050.03711.51
5.3.280.0060.03712.71
5.3.270.0050.04112.73
5.3.260.0070.04512.72
5.3.250.0030.04012.71
5.3.240.0080.03612.72
5.3.230.0100.05612.71
5.3.220.0080.03712.68
5.3.210.0060.04212.68
5.3.200.0030.03912.68
5.3.190.0060.03812.68
5.3.180.0080.03412.67
5.3.170.0060.03812.67
5.3.160.0060.04012.68
5.3.150.0070.04112.67
5.3.140.0050.03812.66
5.3.130.0070.04212.66
5.3.120.0080.03912.66
5.3.110.0070.04012.66
5.3.100.0080.03712.13
5.3.90.0070.03712.11
5.3.80.0080.04312.09
5.3.70.0060.04212.09
5.3.60.0110.04112.08
5.3.50.0030.03912.02
5.3.40.0040.03812.02
5.3.30.0060.03911.98
5.3.20.0060.03511.77
5.3.10.0070.03311.74
5.3.00.0090.03811.71
5.2.170.0050.0319.22
5.2.160.0060.0289.21
5.2.150.0080.0449.21
5.2.140.0100.0429.21
5.2.130.0030.0319.18
5.2.120.0060.0279.18
5.2.110.0060.0279.18
5.2.100.0060.0279.18
5.2.90.0040.0309.18
5.2.80.0070.0279.18
5.2.70.0040.0319.17
5.2.60.0060.0299.13
5.2.50.0040.0319.09
5.2.40.0090.0309.07
5.2.30.0080.0389.05
5.2.20.0060.0319.04
5.2.10.0120.0328.95
5.2.00.0060.0348.80
5.1.60.0070.0218.09
5.1.50.0030.0268.08
5.1.40.0020.0268.06
5.1.30.0060.0328.42
5.1.20.0030.0318.44
5.1.10.0040.0278.16
5.1.00.0080.0328.16
5.0.50.0080.0296.64
5.0.40.0050.0266.51
5.0.30.0020.0346.31
5.0.20.0070.0236.29
5.0.10.0030.0206.26
5.0.00.0050.0346.25
4.4.90.0030.0184.78
4.4.80.0030.0224.75
4.4.70.0050.0214.76
4.4.60.0050.0194.76
4.4.50.0040.0204.77
4.4.40.0020.0334.70
4.4.30.0060.0174.76
4.4.20.0030.0174.85
4.4.10.0040.0234.85
4.4.00.0040.0294.76
4.3.110.0020.0164.67
4.3.100.0050.0134.66
4.3.90.0030.0164.63
4.3.80.0020.0254.59
4.3.70.0020.0154.63
4.3.60.0040.0164.63
4.3.50.0040.0234.63
4.3.40.0020.0264.54
4.3.30.0030.0203.30
4.3.20.0020.0223.28
4.3.10.0030.0153.24
4.3.00.0000.01715.90

preferences:
140.03 ms | 1394 KiB | 7 Q