3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.16 ms | 1394 KiB | 17 Q