3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo preg_replace_callback("/[A-Z]/", function($ma){ return "_".strtolower($ma[0]); }, "userId");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kC52c
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'preg_replace_callback'
          1        SEND_VAL                                                     '%2F%5BA-Z%5D%2F'
          2        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    4     3        SEND_VAL                                                     ~0
          4        SEND_VAL                                                     'userId'
    2     5        DO_ICALL                                             $1      
    4     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/kC52c
function name:  {closure:/in/kC52c:2}
number of ops:  8
compiled vars:  !0 = $ma
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        INIT_FCALL                                                   'strtolower'
          2        FETCH_DIM_R                                          ~1      !0, 0
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                             $2      
          5        CONCAT                                               ~3      '_', $2
          6      > RETURN                                                       ~3
    4     7*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.49 ms | 3093 KiB | 15 Q