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; } } $o = new O; 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 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/aVpvN
function name:  (null)
number of ops:  20
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'O'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_OBJ_R                                      ~5      !0, 'string'
          4        IS_EQUAL                                                 ~5, 'string'
          5      > JMPNZ                                                    ~4, ->17
   16     6    >   FETCH_OBJ_R                                      ~6      !0, 'int'
          7        IS_EQUAL                                                 ~6, 'string'
          8      > JMPNZ                                                    ~4, ->17
   17     9    >   FETCH_OBJ_R                                      ~7      !0, 'float'
         10        IS_EQUAL                                                 ~7, 'string'
         11      > JMPNZ                                                    ~4, ->17
   19    12    >   INIT_METHOD_CALL                                         !0, 'method'
         13        DO_FCALL                                      0  $8      
         14        IS_EQUAL                                                 $8, 'string'
         15      > JMPNZ                                                    ~4, ->18
         16    > > JMP                                                      ->19
   18    17    > > JMP                                                      ->19
   20    18    > > JMP                                                      ->19
   21    19    > > RETURN                                                   1

Class O:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aVpvN
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:
154.97 ms | 1399 KiB | 13 Q