3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $match = preg_replace_callback(array('/\d/', '/a/'), function($matches)use(&$result){ $result[] = $matches; return '_'; }, 'ada2d1', 1); print_r($match);