3v4l.org

run code in 300+ PHP versions simultaneously
<?php $methods = ['GET']; $method = 'GET'; function my_method($method) { return []; } if ($methods && ($method = $methods[0]) && $supported_formats = my_method($method)) { print "foo"; } else { print "bar"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/dVZi2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $methods, !1 = $method, !2 = $supported_formats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'GET'
    8     2      > JMPZ_EX                                          ~5      !0, ->6
          3    >   FETCH_DIM_R                                      ~6      !0, 0
          4        ASSIGN                                           ~7      !1, ~6
          5        BOOL                                             ~5      ~7
          6    > > JMPZ_EX                                          ~5      ~5, ->12
          7    >   INIT_FCALL                                               'my_method'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                           ~9      !2, $8
         11        BOOL                                             ~5      ~9
         12    > > JMPZ                                                     ~5, ->15
    9    13    >   ECHO                                                     'foo'
    8    14      > JMP                                                      ->16
   12    15    >   ECHO                                                     'bar'
   13    16    > > RETURN                                                   1

Function my_method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dVZi2
function name:  my_method
number of ops:  3
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   <array>
    6     2*     > RETURN                                                   null

End of function my_method

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.42 ms | 1006 KiB | 14 Q