3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Hello, How Are You."; echo preg_replace_callback("/([a-z]+)/i",function($m){ return implode(array_map('strrev',str_split($m[0],2))); },$str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uS5QE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello%2C+How+Are+You.'
    4     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%28%5Ba-z%5D%2B%29%2Fi'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    6     4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
    4     6        DO_ICALL                                         $3      
    6     7        ECHO                                                     $3
          8      > 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/uS5QE
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'implode'
          2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'strrev'
          4        INIT_FCALL                                               'str_split'
          5        FETCH_DIM_R                                      ~1      !0, 0
          6        SEND_VAL                                                 ~1
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13      > RETURN                                                   $4
    6    14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.86 ms | 1013 KiB | 17 Q