Anybody knows the technical reason why this constraint is placed on PHP classes (at least in v5.1x)?
Anybody knows the technical reason why this constraint is placed on PHP classes (at
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Constants cannot contain mutable types. A constant is a “variable” that cannot be changed; it cannot be assigned to, but if its value were mutable, then it could be changed just by mutating the value: