3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EnumShit { const SHOW_TEST = 1 ** 2; const SHOW_DERP = 2 ** 2; public function __construct($type) { switch ($type) { case self::SHOW_DERP: echo "Showing derp!\n"; break; case self::SHOW_TEST: echo "Showing Test!\n"; break; case self::SHOW_DERP | self::SHOW_TEST: echo "Showing both!\n"; break; } } } new EnumShit(EnumShit::SHOW_TEST);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F27kt
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $0      'EnumShit'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
          4      > RETURN                                                   1

Class EnumShit:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
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: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
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/F27kt
function name:  __construct
number of ops:  15
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        IS_EQUAL                                                 !0, 4
          2      > JMPNZ                                                    ~1, ->8
          3    >   IS_EQUAL                                                 !0, 1
          4      > JMPNZ                                                    ~1, ->10
          5    >   IS_EQUAL                                                 !0, 5
          6      > JMPNZ                                                    ~1, ->12
          7    > > JMP                                                      ->14
   10     8    >   ECHO                                                     'Showing+derp%21%0A'
   11     9      > JMP                                                      ->14
   14    10    >   ECHO                                                     'Showing+Test%21%0A'
   15    11      > JMP                                                      ->14
   18    12    >   ECHO                                                     'Showing+both%21%0A'
   19    13      > JMP                                                      ->14
   21    14    > > RETURN                                                   null

End of function __construct

End of class EnumShit.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.46 ms | 1395 KiB | 13 Q