3v4l.org

run code in 300+ PHP versions simultaneously
<?php class wpq { private $unreferenced; public function __get($name) { return (array)$this->$name; } } function ret_assoc() { return array('foo' => 'bar'); } $wpq = new wpq; $wpq->interesting =& ret_assoc(); $x = $wpq->interesting; printf("%s\n", $x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HK98o
function name:  (null)
number of ops:  15
compiled vars:  !0 = $wpq, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'wpq'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_FCALL                                               'ret_assoc'
          4        DO_FCALL                                      0  $6      
          5        MAKE_REF                                         $7      $6
          6        ASSIGN_OBJ_REF                                           !0, 'interesting'
          7        OP_DATA                                                  $7
   17     8        FETCH_OBJ_R                                      ~8      !0, 'interesting'
          9        ASSIGN                                                   !1, ~8
   18    10        INIT_FCALL                                               'printf'
         11        SEND_VAL                                                 '%25s%0A'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function ret_assoc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HK98o
function name:  ret_assoc
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   <array>
   13     1*     > RETURN                                                   null

End of function ret_assoc

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

End of function __get

End of class wpq.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.43 ms | 1389 KiB | 16 Q