3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initialize a sentence to a variable $sentence = '練馬春日町Ⅳ 清掃レポート.pdf'; // Use preg_match() function to get the // first word of a string preg_match('/\b\w+\b/i', $sentence, $result); // Display result echo "The first word of string is: ".$result[0]; ?>

preferences:
154.33 ms | 404 KiB | 5 Q