3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Person { public $name; private $age; //private access public function __set($age, $value) { return false; } } class Employee extends Person{ public $id; public $salary; //class property } $emp = new Employee(); $emp->name="ABCD"; $emp->age = 30; $emp->id=101; $emp->salary=20000; echo "<br/> Name : ".$emp->name; echo "<br/> Age : ".$emp->age;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrNTe
function name:  (null)
number of ops:  18
compiled vars:  !0 = $emp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'Employee'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   18     3        ASSIGN_OBJ                                                   !0, 'name'
          4        OP_DATA                                                      'ABCD'
   19     5        ASSIGN_OBJ                                                   !0, 'age'
          6        OP_DATA                                                      30
   20     7        ASSIGN_OBJ                                                   !0, 'id'
          8        OP_DATA                                                      101
   21     9        ASSIGN_OBJ                                                   !0, 'salary'
         10        OP_DATA                                                      20000
   23    11        FETCH_OBJ_R                                          ~8      !0, 'name'
         12        CONCAT                                               ~9      '%3Cbr%2F%3E+Name+%3A+', ~8
         13        ECHO                                                         ~9
   24    14        FETCH_OBJ_R                                          ~10     !0, 'age'
         15        CONCAT                                               ~11     '%3Cbr%2F%3E+Age+%3A+', ~10
         16        ECHO                                                         ~11
         17      > RETURN                                                       1

Class Person:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrNTe
function name:  __set
number of ops:  4
compiled vars:  !0 = $age, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2      > RETURN                                                       <false>
    9     3*     > RETURN                                                       null

End of function __set

End of class Person.

Class Employee:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrNTe
function name:  __set
number of ops:  4
compiled vars:  !0 = $age, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2      > RETURN                                                       <false>
    9     3*     > RETURN                                                       null

End of function __set

End of class Employee.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.97 ms | 2567 KiB | 13 Q