|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-01-27 09:56 UTC] chx@php.net
-Status: Open
+Status: Not a bug
-Package: PHP Language Specification
+Package: Scripting Engine problem
[2016-01-27 09:56 UTC] chx@php.net
[2023-11-10 15:25 UTC] ragafa5955 at glalen dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 10:00:01 2025 UTC |
Description: ------------ I have a class having two private property named name and age. I have created object outside of class and able to access those private property outside class. Please look into this issue also let us know why is it working properly? Test script: --------------- <?php class Person { private $name; private $age; } class Student extends Person { public $rollNo; public $marks; } $object = new Student(); $object->name = 'Vikash'; $object->age = 30; echo $object->name; Expected result: ---------------- Must through fatal error Actual result: -------------- Vikash