3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $x = 0; protected $y = 0; function __construct() { $this->x = 1; $this->y = 2; $this->z = 3; } } $foo = new foo(); $foo->a = 1; $a = []; $a['x'] = 1; $a['x'] = 2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oS15f
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  1
   17     5        ASSIGN                                                   !1, <array>
   18     6        ASSIGN_DIM                                               !1, 'x'
          7        OP_DATA                                                  1
   19     8        ASSIGN_DIM                                               !1, 'x'
          9        OP_DATA                                                  2
         10      > RETURN                                                   1

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

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.97 ms | 1393 KiB | 13 Q