3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camel(){ echo preg_replace('/(_[a-z])/g', function($u) { return str_replace('', '_', strtoupper($u)); } ); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DoQbU
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   1

Function camel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DoQbU
function name:  camel
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%2F%28_%5Ba-z%5D%29%2Fg'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDoQbU%3A6%240'
   14     3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
   17     6      > RETURN                                                   null

End of function camel

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.66 ms | 1395 KiB | 19 Q