3v4l.org

run code in 300+ PHP versions simultaneously
<?php $words=array("ann@ibbeck.de"=>"kan", "Petermann@ibbeck.de"=>"ap", "_animal_sound_"=>"MEooow"); $source="ann@ibbeck.de,Petermann@ibbeck.de"; echo (preg_replace_callback("/\b_(\w*)_\b/", function($match) use ($words) { if(isset($words[$match[0]])){ return ($words[$match[0]]); }else{ return($match[0]); } }, $source)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5gdo6
function name:  (null)
number of ops:  11
compiled vars:  !0 = $words, !1 = $source
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 'ann%40ibbeck.de%2CPetermann%40ibbeck.de'
   10     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAL                                                 '%2F%5Cb_%28%5Cw%2A%29_%5Cb%2F'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5gdo6%3A10%240'
          5        BIND_LEXICAL                                             ~4, !0
   15     6        SEND_VAL                                                 ~4
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        ECHO                                                     $5
   16    10      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F5gdo6%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1395 KiB | 15 Q