3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "M&ouml;hre"; $rest = "M&ouml;hre"; $result = "M&ouml;hre"; do { $rest = stristr($rest,$s); $replace = substr($rest,0,strlen($s)); $result = str_replace($replace,"<span class='textHighlight'>{$replace}</span>",$result); $rest = substr($rest,strlen($s)); } while ($rest != false); echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 3
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/GCNg8
function name:  (null)
number of ops:  34
compiled vars:  !0 = $s, !1 = $rest, !2 = $result, !3 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'M%26ouml%3Bhre'
    4     1        ASSIGN                                                   !1, 'M%26ouml%3Bhre'
    5     2        ASSIGN                                                   !2, 'M%26ouml%3Bhre'
    7     3    >   INIT_FCALL                                               'stristr'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    8     8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 0
         11        STRLEN                                           ~9      !0
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !3, $10
    9    15        INIT_FCALL                                               'str_replace'
         16        SEND_VAR                                                 !3
         17        ROPE_INIT                                     3  ~13     '%3Cspan+class%3D%27textHighlight%27%3E'
         18        ROPE_ADD                                      1  ~13     ~13, !3
         19        ROPE_END                                      2  ~12     ~13, '%3C%2Fspan%3E'
         20        SEND_VAL                                                 ~12
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !2, $15
   10    24        INIT_FCALL                                               'substr'
         25        SEND_VAR                                                 !1
         26        STRLEN                                           ~17     !0
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                         $18     
         29        ASSIGN                                                   !1, $18
   11    30        BOOL                                             ~20     !1
         31      > JMPNZ                                                    ~20, ->3
   12    32    >   ECHO                                                     !2
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.43 ms | 1396 KiB | 19 Q