3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x) { switch ($x) { case 1; var_dump('WHAT'); default; var_dump($x); } } foo(1); foo(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vpifc
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0          
   13     3        INIT_FCALL                                               'foo'
          4        SEND_VAL                                                 2
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vpifc
function name:  foo
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_EQUAL                                                 !0, 1
          2      > JMPNZ                                                    ~1, ->4
          3    > > JMP                                                      ->7
    6     4    >   INIT_FCALL                                               'var_dump'
          5        SEND_VAL                                                 'WHAT'
          6        DO_ICALL                                                 
    8     7    >   INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   10    10      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.33 ms | 1389 KiB | 17 Q