3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mediaapi_filter_underscoretocamelcase($string) { $string = explode('_', $string); array_walk($string, function ($item) { $item = ucfirst($item); }); return implode('', $string); } echo mediaapi_filter_underscoretocamelcase('franz_deleon');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jNE2d
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'mediaapi_filter_underscoretocamelcase'
          1        SEND_VAL                                                 'franz_deleon'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function mediaapi_filter_underscoretocamelcase:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jNE2d
function name:  mediaapi_filter_underscoretocamelcase
number of ops:  17
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '_'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    6     6        INIT_FCALL                                               'array_walk'
          7        SEND_REF                                                 !0
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FjNE2d%3A6%240'
    8     9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15      > RETURN                                                   $5
   10    16*     > RETURN                                                   null

End of function mediaapi_filter_underscoretocamelcase

Function %00%7Bclosure%7D%2Fin%2FjNE2d%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jNE2d
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'ucfirst'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    8     5      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.32 ms | 1390 KiB | 22 Q