3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/\b[^\s]*a\b/i', fn($matches) => str_replace("a", "o", $matches[0]), 'kak kaka aaak aaa');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QnbI2
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace_callback'
          1        SEND_VAL                                                 '%2F%5Cb%5B%5E%5Cs%5D%2Aa%5Cb%2Fi'
          2        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'kak+kaka+aaak+aaa'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QnbI2
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'a'
          3        SEND_VAL                                                 'o'
          4        FETCH_DIM_R                                      ~1      !0, 0
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
          8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.36 ms | 1001 KiB | 15 Q