3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($i) { return $i; } switch (f(0)) { case 66: $x = 1; break; case 54: $x = 2; break; default: $x = 3; break; }
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 = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
filename:       /in/NFJho
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'f'
          1        SEND_VAL                                                 0
          2        DO_FCALL                                      0  $1      
    7     3        CASE                                                     $1, 66
          4      > JMPNZ                                                    ~2, ->8
   11     5    >   CASE                                                     $1, 54
          6      > JMPNZ                                                    ~2, ->10
          7    > > JMP                                                      ->12
    8     8    >   ASSIGN                                                   !0, 1
    9     9      > JMP                                                      ->14
   12    10    >   ASSIGN                                                   !0, 2
   13    11      > JMP                                                      ->14
   16    12    >   ASSIGN                                                   !0, 3
   17    13      > JMP                                                      ->14
         14    >   FREE                                                     $1
   18    15      > RETURN                                                   1

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.18 ms | 1398 KiB | 14 Q