3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 1; switch($bar=$foo++) { case (++$bar==$foo--): $foo=$bar; echo $foo; continue; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
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: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
filename:       /in/2JWvM
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        POST_INC                                         ~3      !0
          2        ASSIGN                                           ~4      !1, ~3
    4     3        PRE_INC                                          ~6      !1
          4        POST_DEC                                         ~7      !0
          5        IS_EQUAL                                         ~8      ~6, ~7
          6        CASE                                                     ~4, ~8
          7      > JMPNZ                                                    ~5, ->9
          8    > > JMP                                                      ->12
    5     9    >   ASSIGN                                                   !0, !1
         10        ECHO                                                     !0
    6    11      > JMP                                                      ->12
         12    >   FREE                                                     ~4
    8    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.88 ms | 1384 KiB | 13 Q