3v4l.org

run code in 300+ PHP versions simultaneously
<?php var $test = "a\n \n\na\naze"; $test = preg_replace('/\n\s*/g', '', $test); var_dump($test);

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.350.0120.04312.01
5.4.340.0080.04412.01
5.4.320.0110.03512.49
5.4.310.0030.04212.49
5.4.300.0050.03912.50
5.4.290.0080.04512.50
5.4.280.0050.04012.39
5.4.270.0070.03612.39
5.4.260.0040.04212.39
5.4.250.0080.03712.39
5.4.240.0070.03812.39
5.4.230.0090.04112.38
5.4.220.0090.04012.38
5.4.210.0060.03912.38
5.4.200.0070.03612.38
5.4.190.0080.03512.38
5.4.180.0070.03412.38
5.4.170.0080.03712.39
5.4.160.0070.03612.38
5.4.150.0070.03512.38
5.4.140.0060.03712.07
5.4.130.0090.03812.05
5.4.120.0080.03312.02
5.4.110.0080.03912.01
5.4.100.0030.03812.01
5.4.90.0090.03512.01
5.4.80.0060.04012.01
5.4.70.0060.03912.01
5.4.60.0100.04612.01
5.4.50.0110.03912.01
5.4.40.0080.03712.00
5.4.30.0070.03711.99
5.4.20.0130.05311.98
5.4.10.0090.04311.99
5.4.00.0060.04111.48
5.3.290.0060.04512.80
5.3.280.0080.03812.71
5.3.270.0050.04512.73
5.3.260.0060.04112.72
5.3.250.0090.03712.72
5.3.240.0080.05012.72
5.3.230.0100.04912.70
5.3.220.0100.03912.68
5.3.210.0080.03712.68
5.3.200.0080.03512.68
5.3.190.0050.03812.68
5.3.180.0080.03612.67
5.3.170.0040.03912.66
5.3.160.0050.03812.68
5.3.150.0050.04012.67
5.3.140.0050.04112.66
5.3.130.0060.04212.66
5.3.120.0060.04412.66
5.3.110.0070.04712.66
5.3.100.0090.03912.12
5.3.90.0170.05812.08
5.3.80.0100.04612.07
5.3.70.0100.04612.08
5.3.60.0110.04512.06
5.3.50.0070.03612.00
5.3.40.0050.04912.00
5.3.30.0060.03811.95
5.3.20.0110.05211.73
5.3.10.0040.04111.70
5.3.00.0120.04711.68
5.2.170.0030.0359.18
5.2.160.0060.0319.18
5.2.150.0040.0339.18
5.2.140.0100.0339.18
5.2.130.0060.0329.14
5.2.120.0040.0299.14
5.2.110.0050.0329.15
5.2.100.0070.0349.14
5.2.90.0090.0269.14
5.2.80.0130.0329.14
5.2.70.0060.0309.14
5.2.60.0060.0309.09
5.2.50.0070.0299.06
5.2.40.0060.0339.03
5.2.30.0070.0339.02
5.2.20.0080.0299.00
5.2.10.0080.0338.93
5.2.00.0070.0428.79
5.1.60.0050.0428.06
5.1.50.0060.0278.06
5.1.40.0040.0268.05
5.1.30.0050.0308.40
5.1.20.0110.0318.42
5.1.10.0080.0308.14
5.1.00.0060.0298.14
5.0.50.0040.0266.63
5.0.40.0070.0246.48
5.0.30.0050.0326.29
5.0.20.0020.0226.27
5.0.10.0060.0196.23
5.0.00.0040.0316.23
4.4.90.0030.0174.78
4.4.80.0050.0164.75
4.4.70.0050.0174.75
4.4.60.0040.0204.76
4.4.50.0050.0204.77
4.4.40.0060.0314.71
4.4.30.0080.0264.76
4.4.20.0030.0174.84
4.4.10.0040.0234.85
4.4.00.0060.0274.76
4.3.110.0040.0184.67
4.3.100.0070.0404.66
4.3.90.0060.0184.64
4.3.80.0030.0424.58
4.3.70.0080.0154.63
4.3.60.0080.0194.63
4.3.50.0030.0234.63
4.3.40.0030.0344.54
4.3.30.0070.0363.28
4.3.20.0080.0383.26
4.3.10.0030.0203.22
4.3.00.0000.02311.00

preferences:
136.74 ms | 1394 KiB | 7 Q