3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Drive_Filter_NormalizeName // implements Zend_Filter_Interface { protected function _replace(array $match) { print_r($match); } public function filter($name) { if (function_exists('mb_strtolower')) { $name = mb_strtolower($name); } else { $name = strtolower($name); } $name = preg_replace_callback('/(\d+)(\.)?/', array($this, '_replace'), $name); return $name; } } $filter = new Drive_Filter_NormalizeName; echo $filter->filter('dupa5_5.23_dupa3');
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 5 [1] => 5 ) Array ( [0] => 5. [1] => 5 [2] => . ) Array ( [0] => 23 [1] => 23 ) Array ( [0] => 3 [1] => 3 ) dupa__dupa

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:
52.22 ms | 401 KiB | 8 Q