- Output for 5.4.1 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
- Parse error: syntax error, unexpected '}' in /in/0nTf4 on line 3
Process exited with code 255.
<?php
$string='direction-only';
echo preg_match_callback('/(\w*)-(\w*)/', function($match) {return implode('', array_map($match, function($string) {return ucfirst($string)}))}, $string);