3v4l.org

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

Function v2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8TSMX
function name:  v2
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%28%5BA-Z%5D%29%2F'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8TSMX%3A3%240'
          4        SEND_VAL                                                 ~1
          5        INIT_FCALL                                               'lcfirst'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10      > RETURN                                                   $3
    4    11*     > RETURN                                                   null

End of function v2

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.16 ms | 1403 KiB | 20 Q