Closed lisfox1 closed 4 years ago
Using typed properties:
<?php class User { public int $id; public string $name; } ?>
Results in: Try to avoid public class variables. Use Getter to access the variable. It supports the principle of privacy.
Try to avoid public class variables. Use Getter to access the variable. It supports the principle of privacy.
Yes, is there a change?
If there is a new concept in PHP for public class members, please let me know and argument with sources. Thanks.
Using typed properties:
Results in:
Try to avoid public class variables. Use Getter to access the variable. It supports the principle of privacy.