3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = "I wish for choice cards spelling PREJOIN 'coz I love Nature."; $words = explode(' ', $x); $string = ''; foreach($words as $word){ $string .= ((strtoupper($word) == $word && !in_array($word, array('I'))) ? '<b>' . $word . '</b>' : $word) . ' '; } echo $string;

preferences:
26.76 ms | 405 KiB | 5 Q