3v4l.org

run code in 300+ PHP versions simultaneously
<?php function titleCaseSpecial($string) { return preg_replace_callback( '~[/.-]\p{Ll}~u', function ($m) { return mb_strtoupper($m[0], 'UTF-8'); }, mb_convert_case($string, MB_CASE_TITLE, 'UTF-8') ); } $strings = [ 'Name: MR. M.A.D KARIM', 'Address: 12/A, ROOM NO-B 13' ]; var_export( array_map('titleCaseSpecial', $strings) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'Name: Mr. M.A.D Karim', 1 => 'Address: 12/A, Room No-B 13', )

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:
29.24 ms | 405 KiB | 5 Q