3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/([a-z])(_[a-z])/', function($u) { var_dump($u); return $u[0].ucwords(str_replace('_', '', $u[1])); } , 'rob_tr_yuui'); echo PHP_EOL; echo preg_replace('/([a-z])(_[a-z])/', '$1$2', 'rob_tr_yuui');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M4Hcd
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'preg_replace_callback'
          1        SEND_VAL                                                 '%2F%28%5Ba-z%5D%29%28_%5Ba-z%5D%29%2F'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FM4Hcd%3A6%240'
   14     3        SEND_VAL                                                 ~0
   15     4        SEND_VAL                                                 'rob_tr_yuui'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
   20     7        ECHO                                                     '%0A'
   26     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%2F%28%5Ba-z%5D%29%28_%5Ba-z%5D%29%2F'
         10        SEND_VAL                                                 '%241%242'
         11        SEND_VAL                                                 'rob_tr_yuui'
         12        DO_ICALL                                         $2      
         13        ECHO                                                     $2
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FM4Hcd%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M4Hcd
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4        FETCH_DIM_R                                      ~2      !0, 0
          5        INIT_FCALL                                               'ucwords'
          6        INIT_FCALL                                               'str_replace'
          7        SEND_VAL                                                 '_'
          8        SEND_VAL                                                 ''
          9        FETCH_DIM_R                                      ~3      !0, 1
         10        SEND_VAL                                                 ~3
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
         14        CONCAT                                           ~6      ~2, $5
         15      > RETURN                                                   ~6
   14    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FM4Hcd%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.99 ms | 1396 KiB | 23 Q