3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Drive_Filter_NormalizeName // implements Zend_Filter_Interface { protected function _replace(array $match) { return sprintf("%012d%s", $match[1], isset($match[2]) ? $match[2] : ''); } public function filter($name) { if (function_exists('mb_strtolower')) { $name = mb_strtolower($name); } else { $name = strtolower($name); } $name = preg_replace_callback('/(\d+)([.,]\d+)?/', array($this, '_replace'), $name); return $name; } } $filter = new Drive_Filter_NormalizeName; echo $filter->filter('Dupa5_5.23_DÓpa3');

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.0070.00716.78
7.3.00.0030.00916.61
7.2.130.0030.00617.14
7.2.120.0060.00917.03
7.2.110.0000.01416.86
7.2.100.0040.00817.08
7.2.90.0040.01117.43
7.2.80.0060.00317.26
7.2.70.0080.00817.24
7.2.60.0070.00717.02
7.2.50.0040.01217.34
7.2.40.0060.00617.23
7.2.30.0120.00317.47
7.2.20.0000.01017.27
7.2.10.0090.00016.98
7.2.00.0030.01118.53
7.1.250.0030.00616.06
7.1.100.0100.00318.27
7.1.70.0030.01017.61
7.1.60.0040.01119.46
7.1.50.0210.01217.12
7.1.00.0000.07322.41
7.0.200.0040.00416.77
7.0.140.0000.07321.96
7.0.60.0000.07319.95
7.0.50.0130.03317.82
7.0.40.0100.04020.20
7.0.30.0370.07020.10
7.0.20.0330.06020.21
7.0.10.0000.09320.09
7.0.00.0070.09020.24
5.6.280.0000.07720.83
5.6.210.0000.05320.53
5.6.200.0170.07718.27
5.6.190.0030.05020.48
5.6.180.0070.06020.48
5.6.170.0470.07020.55
5.6.160.0000.09320.48
5.6.150.0000.04318.18
5.6.140.0070.03718.17
5.6.130.0000.04318.19
5.6.120.0130.07321.10
5.6.110.0030.04021.00
5.6.100.0030.07021.12
5.6.90.0000.05021.00
5.6.80.0100.07720.54
5.5.350.4330.03320.47
5.5.340.0100.05317.97
5.5.330.0130.07720.31
5.5.320.0130.04320.34
5.5.310.0470.06720.50
5.5.300.0170.06317.95
5.5.290.0000.07017.98
5.5.280.0070.05720.66
5.5.270.0170.07320.85
5.5.260.0100.07320.95
5.5.250.0100.04020.59
5.5.240.0100.07320.16
5.4.450.0670.05319.39
5.4.440.0600.06319.45
5.4.430.1330.06319.48
5.4.420.1130.05719.54
5.4.410.0930.06319.25
5.4.400.0930.06718.89
5.4.390.1130.05719.18
5.4.380.0170.05718.57
5.4.370.0230.04318.84
5.4.360.0200.04718.48
5.4.350.0230.04318.47
5.4.340.0170.05018.84
5.4.320.0080.04612.50
5.4.310.0080.03612.50
5.4.300.0060.03712.51
5.4.290.0070.04412.50
5.4.280.0040.04212.40
5.4.270.0060.04412.40
5.4.260.0120.03612.40
5.4.250.0070.04712.40
5.4.240.0110.07312.40
5.4.230.0120.05512.39
5.4.220.0120.05812.39
5.4.210.0090.06212.39
5.4.200.0030.04912.39
5.4.190.0080.04112.39
5.4.180.0090.04212.39
5.4.170.0070.03912.39
5.4.160.0060.05512.39
5.4.150.0080.04512.39
5.4.140.0070.04812.07
5.4.130.0210.06112.06
5.4.120.0180.06812.02
5.4.110.0140.05012.02
5.4.100.0080.05312.01
5.4.90.0140.06512.02
5.4.80.0100.06412.02
5.4.70.0060.05812.01
5.4.60.0120.05212.01
5.4.50.0070.04712.01
5.4.40.0070.05612.00
5.4.30.0130.03812.00
5.4.20.0100.05012.00
5.4.10.0080.05212.00
5.4.00.0070.04311.48
5.3.290.0080.05312.80
5.3.280.0260.07012.71
5.3.270.0120.07412.72
5.3.260.0120.05912.72
5.3.250.0080.05712.72
5.3.240.0230.07412.72
5.3.230.0080.05512.71
5.3.220.0080.06212.68
5.3.210.0050.06312.68
5.3.200.0100.04712.68
5.3.190.0150.04112.68
5.3.180.0080.04612.67
5.3.170.0110.07912.67
5.3.160.0170.06112.68
5.3.150.0130.05812.67
5.3.140.0050.08212.66
5.3.130.0130.06912.66
5.3.120.0100.07012.66
5.3.110.0110.05612.66
5.3.100.0090.05012.14
5.3.90.0140.04812.12
5.3.80.0130.06312.11
5.3.70.0100.04812.11
5.3.60.0070.05212.09
5.3.50.0120.04812.04
5.3.40.0070.06612.04
5.3.30.0070.06012.00
5.3.20.0120.04611.77
5.3.10.0160.08311.75
5.3.00.0100.04411.73
5.2.170.0030.0359.23
5.2.160.0080.0429.24
5.2.150.0070.0469.23
5.2.140.0080.0449.23
5.2.130.0080.0419.20
5.2.120.0090.0309.19
5.2.110.0070.0329.20
5.2.100.0080.0369.19
5.2.90.0110.0379.20
5.2.80.0170.0579.19
5.2.70.0060.0449.18
5.2.60.0090.0309.14
5.2.50.0070.0319.11
5.2.40.0080.0389.09
5.2.30.0050.0459.07
5.2.20.0060.0349.06
5.2.10.0080.0628.96
5.2.00.0120.0388.82
5.1.60.0030.0288.10
5.1.50.0040.0258.10
5.1.40.0060.0248.08
5.1.30.0080.0258.43
5.1.20.0080.0268.45
5.1.10.0060.0268.18
5.1.00.0060.0268.18
5.0.50.0080.0186.64
5.0.40.0060.0196.50
5.0.30.0040.0346.31
5.0.20.0260.0446.28
5.0.10.0060.0366.26
5.0.00.0050.0366.25
4.4.90.0030.0154.78
4.4.80.0020.0174.75
4.4.70.0030.0154.75
4.4.60.0040.0154.75
4.4.50.0040.0174.77
4.4.40.0050.0314.71
4.4.30.0030.0204.76
4.4.20.0020.0164.84
4.4.10.0040.0144.85
4.4.00.0010.0314.75
4.3.110.0060.0174.67
4.3.100.0040.0144.67
4.3.90.0040.0154.63
4.3.80.0040.0274.58
4.3.70.0060.0154.63
4.3.60.0020.0194.63
4.3.50.0070.0124.63
4.3.40.0030.0294.54
4.3.30.0030.0213.30
4.3.20.0010.0183.28
4.3.10.0030.0193.23
4.3.00.0070.0236.94