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'); if($x = 0) echo $foo; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
Branch analysis from position: 9
filename:       /in/QGFdR
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->10
    7     2    >   INIT_FCALL                                               'v2'
          3        SEND_VAL                                                 'foo_bar_baz_bee'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
    8     6        ASSIGN                                           ~5      !0, 0
          7      > JMPZ                                                     ~5, ->9
          8    >   ECHO                                                     !1
    6     9    >   PRE_INC                                                  !0
         10    >   IS_SMALLER                                               !0, 10000
         11      > JMPNZ                                                    ~7, ->2
    9    12    > > RETURN                                                   1

Function v2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QGFdR
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%2FQGFdR%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%2FQGFdR%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QGFdR
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%2FQGFdR%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.19 ms | 1403 KiB | 20 Q