3v4l.org

run code in 300+ PHP versions simultaneously
<?php class O { public $string = 'string'; public $int = 0; public $float = 1.0; function method() { return $this->string; } } switch ('string') { case $o->string: case $o->int: case $o->float: break; case $o->method(): break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 14
Branch analysis from position: 14
filename:       /in/VGosC
function name:  (null)
number of ops:  17
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~2      !0, 'string'
          1        IS_EQUAL                                                 ~2, 'string'
          2      > JMPNZ                                                    ~1, ->14
   15     3    >   FETCH_OBJ_R                                      ~3      !0, 'int'
          4        IS_EQUAL                                                 ~3, 'string'
          5      > JMPNZ                                                    ~1, ->14
   16     6    >   FETCH_OBJ_R                                      ~4      !0, 'float'
          7        IS_EQUAL                                                 ~4, 'string'
          8      > JMPNZ                                                    ~1, ->14
   18     9    >   INIT_METHOD_CALL                                         !0, 'method'
         10        DO_FCALL                                      0  $5      
         11        IS_EQUAL                                                 $5, 'string'
         12      > JMPNZ                                                    ~1, ->15
         13    > > JMP                                                      ->16
   17    14    > > JMP                                                      ->16
   19    15    > > JMP                                                      ->16
   20    16    > > RETURN                                                   1

Class O:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VGosC
function name:  method
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'string'
          1      > RETURN                                                   ~0
    9     2*     > RETURN                                                   null

End of function method

End of class O.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.16 ms | 1395 KiB | 13 Q