3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum TestA { case A1; case A2; } enum TestB { case B1; case B2; } $value = TestB::B1; $out = $value instanceof TestB ? 'B' : 'A'; echo "{$out}";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0N1QS
function name:  (null)
number of ops:  13
compiled vars:  !0 = $value, !1 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'testa'
    9     1        DECLARE_CLASS                                            'testb'
   15     2        FETCH_CLASS_CONSTANT                             ~2      'TestB', 'B1'
          3        ASSIGN                                                   !0, ~2
   17     4        INSTANCEOF                                               !0, 'TestB'
          5      > JMPZ                                                     ~4, ->8
          6    >   QM_ASSIGN                                        ~5      'B'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      'A'
          9    >   ASSIGN                                                   !1, ~5
   19    10        CAST                                          6  ~7      !1
         11        ECHO                                                     ~7
         12      > RETURN                                                   1

Class TestA: [no user functions]
Class TestB: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.42 ms | 1447 KiB | 13 Q