3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = "Hello World"; $revd = preg_replace_callback('#([A-Za-z]+)#', 'rev_first', $word); function rev_first($matches){ return strrev($matches[1]); } var_dump($revd);

preferences:
34.52 ms | 402 KiB | 5 Q