3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal { public $height; // height of animal public $weight; // weight of animal private function __construct($height, $weight) { $this->height = $height; //set the height instance variable $this->weight = $weight; //set the weight instance variable } } $a = new Animal(10,100);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oCGsU
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Animal'
          1        SEND_VAL_EX                                              10
          2        SEND_VAL_EX                                              100
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
          5      > RETURN                                                   1

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

End of function __construct

End of class Animal.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.08 ms | 1393 KiB | 13 Q