3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e = new stdClass(); switch (true) { case $e === 'a': echo "geht"; break; case $e instanceof stdClass: echo "Object"; break; } echo "ende";
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/LZSLh
function name:  (null)
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        IS_IDENTICAL                                             !0, 'a'
          4      > JMPNZ                                                    ~5, ->8
    7     5    >   INSTANCEOF                                               !0, 'stdClass'
          6      > JMPNZ                                                    ~6, ->10
          7    > > JMP                                                      ->12
    5     8    >   ECHO                                                     'geht'
    6     9      > JMP                                                      ->12
    8    10    >   ECHO                                                     'Object'
    9    11      > JMP                                                      ->12
   11    12    >   ECHO                                                     'ende'
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148 ms | 1393 KiB | 13 Q