3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public $z; public function __construct($z = 5) { $this->z = 10; } } $a = new myClass(); $b = $a; $b->z = 0; echo $a->z;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OHdcr
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        ASSIGN                                                   !1, !0
   14     4        ASSIGN_OBJ                                               !1, 'z'
          5        OP_DATA                                                  0
   15     6        FETCH_OBJ_R                                      ~7      !0, 'z'
          7        ECHO                                                     ~7
          8      > RETURN                                                   1

Class myClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OHdcr
function name:  __construct
number of ops:  4
compiled vars:  !0 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      5
    8     1        ASSIGN_OBJ                                               'z'
          2        OP_DATA                                                  10
    9     3      > RETURN                                                   null

End of function __construct

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143 ms | 1393 KiB | 13 Q