3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'he said "hello worLd"', 'he sAId "καλημέρα ΚΌΣΜΕ" to me', "Ryan's shirts are verY large", ]; var_export( preg_replace_callback('/[^"]+/', fn($m) => mb_convert_case($m[0], MB_CASE_TITLE, "UTF-8"), $strings) );

preferences:
35.62 ms | 406 KiB | 5 Q