3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { return 'sample'; } function show( $here ) { echo $here; } switch ( $it = test() ) { case 'sample': show($it); break; default: show(''); break; }
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 188) Position 1 = 7, Position 2 = 11, Position 3 = 4
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/q7au9
function name:  (null)
number of ops:  17
compiled vars:  !0 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                           ~2      !0, $1
          3      > SWITCH_STRING                                            ~2, [ 'sample':->7, ], ->11
   14     4    >   CASE                                                     ~2, 'sample'
          5      > JMPNZ                                                    ~3, ->7
          6    > > JMP                                                      ->11
   15     7    >   INIT_FCALL                                               'show'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   16    10      > JMP                                                      ->15
   19    11    >   INIT_FCALL                                               'show'
         12        SEND_VAL                                                 ''
         13        DO_FCALL                                      0          
   20    14      > JMP                                                      ->15
         15    >   FREE                                                     ~2
   21    16      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q7au9
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'sample'
    5     1*     > RETURN                                                   null

End of function test

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q7au9
function name:  show
number of ops:  3
compiled vars:  !0 = $here
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ECHO                                                     !0
   10     2      > RETURN                                                   null

End of function show

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.22 ms | 1398 KiB | 16 Q