3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class A { public function __get($n) { echo __FUNCTION__, "\n"; return $this->$n; } public function __isset($n) { echo __FUNCTION__, "\n"; $this->$n = 123; return true; } } $a = new A; echo $a->foo ?? 234;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDlNW
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $1      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   25     3        FETCH_OBJ_IS                                         ~4      !0, 'foo'
          4        COALESCE                                             ~5      ~4
          5        QM_ASSIGN                                            ~5      234
          6        ECHO                                                         ~5
   26     7      > RETURN                                                       1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDlNW
function name:  __get
number of ops:  6
compiled vars:  !0 = $n
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    8     1        ECHO                                                         '__get'
          2        ECHO                                                         '%0A'
   10     3        FETCH_OBJ_R                                          ~1      !0
          4      > RETURN                                                       ~1
   11     5*     > RETURN                                                       null

End of function __get

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDlNW
function name:  __isset
number of ops:  7
compiled vars:  !0 = $n
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   15     1        ECHO                                                         '__isset'
          2        ECHO                                                         '%0A'
   17     3        ASSIGN_OBJ                                                   !0
          4        OP_DATA                                                      123
   19     5      > RETURN                                                       <true>
   20     6*     > RETURN                                                       null

End of function __isset

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.68 ms | 3318 KiB | 13 Q