3v4l.org

run code in 300+ PHP versions simultaneously
<?php function replace_not_entities($search, $replace, $subject) { return preg_replace_callback('/&[^;]+;|(' . preg_quote($search) . ')/', function($match) use($replace) { return isset($match[1]) ? $replace : $match[0]; }, $subject); } print replace_not_entities('um', '__', 'R&auml;ume');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fgtno
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'replace_not_entities'
          1        SEND_VAL                                                 'um'
          2        SEND_VAL                                                 '__'
          3        SEND_VAL                                                 'R%26auml%3Bume'
          4        DO_FCALL                                      0  $0      
          5        ECHO                                                     $0
          6      > RETURN                                                   1

Function replace_not_entities:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fgtno
function name:  replace_not_entities
number of ops:  17
compiled vars:  !0 = $search, !1 = $replace, !2 = $subject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        INIT_FCALL                                               'preg_replace_callback'
          4        INIT_FCALL                                               'preg_quote'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      '%2F%26%5B%5E%3B%5D%2B%3B%7C%28', $3
          8        CONCAT                                           ~5      ~4, '%29%2F'
          9        SEND_VAL                                                 ~5
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFgtno%3A4%240'
         11        BIND_LEXICAL                                             ~6, !1
    6    12        SEND_VAL                                                 ~6
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $7      
         15      > RETURN                                                   $7
    7    16*     > RETURN                                                   null

End of function replace_not_entities

Function %00%7Bclosure%7D%2Fin%2FFgtno%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fgtno
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $match, !1 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    5     2        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 1
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      !1
          5      > JMP                                                      ->8
          6    >   FETCH_DIM_R                                      ~4      !0, 0
          7        QM_ASSIGN                                        ~3      ~4
          8    > > RETURN                                                   ~3
    6     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFgtno%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.86 ms | 1402 KiB | 18 Q