3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Welcome to Lorien."; $search = "welcome"; $result = preg_replace("/{$search}/i", '<b>$0</b>', $string); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vN9Km
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $search, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Welcome+to+Lorien.'
    4     1        ASSIGN                                                   !1, 'welcome'
    6     2        INIT_FCALL                                               'preg_replace'
          3        ROPE_INIT                                     3  ~6      '%2F'
          4        ROPE_ADD                                      1  ~6      ~6, !1
          5        ROPE_END                                      2  ~5      ~6, '%2Fi'
          6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 '%3Cb%3E%240%3C%2Fb%3E'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    8    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.04 ms | 1010 KiB | 15 Q