3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ var $name; function __construct( string $name){ $this->name = $name; } } class Student extends Person{ public int $age; } $ob = new Student("James"); echo $ob->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/97iKq
function name:  (null)
number of ops:  7
compiled vars:  !0 = $ob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Student'
          1        SEND_VAL_EX                                              'James'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        FETCH_OBJ_R                                      ~4      !0, 'name'
          5        ECHO                                                     ~4
   17     6      > RETURN                                                   1

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

End of function __construct

End of class Person.

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

End of function __construct

End of class Student.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.73 ms | 1007 KiB | 13 Q