3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __get($a){ return new A; } function __isset($a){ echo "exists"; if($a === 'a'){ return true; }else{ return false; } } } $x = new A; var_dump($x->a->b ?? 20);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/87qNt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_IS                                     ~4      !0, 'a'
          5        FETCH_OBJ_IS                                     ~5      ~4, 'b'
          6        COALESCE                                         ~6      ~5
          7        QM_ASSIGN                                        ~6      20
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/87qNt
function name:  __get
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        NEW                                              $1      'A'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $1
    7     4*     > RETURN                                                   null

End of function __get

Function __isset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/87qNt
function name:  __isset
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ECHO                                                     'exists'
   11     2        IS_IDENTICAL                                             !0, 'a'
          3      > JMPZ                                                     ~1, ->6
   12     4    > > RETURN                                                   <true>
   11     5*       JMP                                                      ->7
   14     6    > > RETURN                                                   <false>
   16     7*     > RETURN                                                   null

End of function __isset

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.62 ms | 999 KiB | 14 Q