3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { return 1; } $a = a(); switch ($a) { case 2: $b = 3; break; case 1: $b = 3; break; } echo $b, PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
filename:       /in/aQels
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'a'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   11     3        IS_EQUAL                                                 !0, 2
          4      > JMPNZ                                                    ~4, ->8
   14     5    >   IS_EQUAL                                                 !0, 1
          6      > JMPNZ                                                    ~4, ->10
          7    > > JMP                                                      ->12
   12     8    >   ASSIGN                                                   !1, 3
   13     9      > JMP                                                      ->12
   15    10    >   ASSIGN                                                   !1, 3
   16    11      > JMP                                                      ->12
   19    12    >   ECHO                                                     !1
         13        ECHO                                                     '%0A'
         14      > RETURN                                                   1

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

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.73 ms | 1397 KiB | 14 Q