3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $message = 'choukai kai'; $lowercasemessage = strtolower($message); $replacedwords = array('surfing', 'joke and stuff', 'smile and etc', '3-2', 'choukai kai', 'choukai'); $message = str_ireplace( $replacedwords, array( // here all replaces | each in a new line - watch the syntax // all html possible, but no single quotation mark! '<a href="http://en.wikipedia.org/wiki/Surfing" style="color:darkred;font-weight:bold;">surfing</a>', '<a href="http://en.wikipedia.org/wiki/Joke" style="color:darkred;font-weight:bold;">joke</a>', '<a href="http://en.wikipedia.org/wiki/Smiling" style="color:darkred;font-weight:bold;">Smile</a>', '<a class="screenshot" rel="3-2_Map.jpg">3-2</a>', '<a href="http://en.wikipedia.org/wiki/Joke" style="color:darkred;font-weight:bold;">Choukai Kai</a>', '<a href="http://en.wikipedia.org/wiki/Smiling" style="color:darkred;font-weight:bold;">Choukai</a>' ), $message);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_ireplace() in /in/XLjQG on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_ireplace() in /in/XLjQG on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_ireplace() in /in/XLjQG on line 8