3v4l.org

run code in 300+ PHP versions simultaneously
<?php $k = 1; class first { private $variable = 10; function get() { return $this->variable; } } $first = new first(); $c = &$first->get(); var_dump($first->get(), $c); $c = 15; var_dump($first->get(), $c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SZ4NV
function name:  (null)
number of ops:  21
compiled vars:  !0 = $k, !1 = $first, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
   11     1        NEW                                              $4      'first'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   12     4        INIT_METHOD_CALL                                         !1, 'get'
          5        DO_FCALL                                      0  $7      
          6        ASSIGN_REF                                               !2, $7
   13     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !1, 'get'
          9        DO_FCALL                                      0  $9      
         10        SEND_VAR                                                 $9
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   14    13        ASSIGN                                                   !2, 15
   15    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'get'
         16        DO_FCALL                                      0  $12     
         17        SEND_VAR                                                 $12
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

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

End of function get

End of class first.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1400 KiB | 15 Q