3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word="the"; $replaceWith = "<span class=\"found\">".$word."</span>"; $sentence = "Hello, did you hear the quick brown fox jumped over the lazy dog"; $edited = str_replace($word, $replaceWith, stristr($sentence, $word)); echo $edited;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bkUaZ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $word, !1 = $replaceWith, !2 = $sentence, !3 = $edited
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'the'
    3     1        CONCAT                                           ~5      '%3Cspan+class%3D%22found%22%3E', !0
          2        CONCAT                                           ~6      ~5, '%3C%2Fspan%3E'
          3        ASSIGN                                                   !1, ~6
    4     4        ASSIGN                                                   !2, 'Hello%2C+did+you+hear+the+quick+brown+fox+jumped+over+the+lazy+dog'
    5     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        INIT_FCALL                                               'stristr'
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !3, $10
    6    15        ECHO                                                     !3
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.96 ms | 939 KiB | 18 Q