3v4l.org

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

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

End of function __constuct

End of class Goofy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.85 ms | 1397 KiB | 13 Q