3v4l.org

run code in 300+ PHP versions simultaneously
<?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');
Output for git.master, git.master_jit, rfc.property-hooks
dupa000000000005_000000000005.23_dópa000000000003

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.86 ms | 401 KiB | 8 Q