3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FOO = [ 'a' => 'foo', 'b' => 'bar' ]; function getFoo($thing) { if (isset(FOO[$thing])) { // do shit } else { // do other shit } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M3dBD
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'FOO', <array>
   14     1      > RETURN                                                   1

Function getfoo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/M3dBD
function name:  getFoo
number of ops:  6
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_CONSTANT                                   ~1      'FOO'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->5
          4    > > JMP                                                      ->5
   14     5    > > RETURN                                                   null

End of function getfoo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.18 ms | 1393 KiB | 13 Q