3v4l.org

run code in 300+ PHP versions simultaneously
<?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); echo $message;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HCqlD
function name:  (null)
number of ops:  14
compiled vars:  !0 = $message, !1 = $lowercasemessage, !2 = $replacedwords
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'choukai+kai'
    5     1        INIT_FCALL                                               'strtolower'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        ASSIGN                                                   !2, <array>
    8     6        INIT_FCALL                                               'str_ireplace'
    9     7        SEND_VAR                                                 !2
   14     8        SEND_VAL                                                 <array>
   22     9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $7      
    8    11        ASSIGN                                                   !0, $7
   24    12        ECHO                                                     !0
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.74 ms | 1394 KiB | 17 Q