3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 1; switch($bar=$foo++) { case (++$bar==$foo): echo $bar; break; } echo $foo; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
filename:       /in/NHpeY
function name:  (null)
number of ops:  13
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        IS_EQUAL                                         ~7      !0, ~6
          5        CASE                                                     ~4, ~7
          6      > JMPNZ                                                    ~5, ->8
          7    > > JMP                                                      ->10
    5     8    >   ECHO                                                     !1
    6     9      > JMP                                                      ->10
         10    >   FREE                                                     ~4
    8    11        ECHO                                                     !0
    9    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.74 ms | 1384 KiB | 13 Q