3v4l.org

run code in 300+ PHP versions simultaneously
<?php function v1($value) { return implode(array_map(function($value) { return ucfirst($value); }, explode('_', $value))); } #function v2($value) { # return preg_replace_callback('/([A-Z])/', function($char) { return '_'.strtolower($char[1]); }, lcfirst($value)); #} for($x = 0; $x < 10000; $x++){ $foo = v1('foo_bar_baz_bee'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/c9FJR
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->7
   11     2    >   INIT_FCALL                                               'v1'
          3        SEND_VAL                                                 'foo_bar_baz_bee'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   10     6        PRE_INC                                                  !0
          7    >   IS_SMALLER                                               !0, 10000
          8      > JMPNZ                                                    ~6, ->2
   12     9    > > RETURN                                                   1

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

End of function v1

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

End of function %00%7Bclosure%7D%2Fin%2Fc9FJR%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1394 KiB | 22 Q