3v4l.org

run code in 300+ PHP versions simultaneously
<?php class person{ private $name; private $age; private $sex; function __construct($name="",$sex="",$age=""){ $this->name = $name; $this->age = $age; $this->sex = $sex; } } function read(){ $per = new person("dafa","a","v"); print_r($per); } $a = read();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pCpB5
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'read'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Function read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pCpB5
function name:  read
number of ops:  10
compiled vars:  !0 = $per
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'person'
          1        SEND_VAL_EX                                              'dafa'
          2        SEND_VAL_EX                                              'a'
          3        SEND_VAL_EX                                              'v'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   18     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   19     9      > RETURN                                                   null

End of function read

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

End of function __construct

End of class person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.35 ms | 1399 KiB | 16 Q