my php oop practice folder from 2021
i was trying to learn classes, inheritance, interfaces and autoloading so this repo has small examples
src/BasicClass.php- simple user classsrc/Inheritance.php- admin extends usersrc/InterfaceExample.php- example of interfacesrc/Autoload.php- my first autoloading trysrc/FormHelper.php- validating forms with ooppublic/form.php- small form to test
you need php 7 or higher. run a local server:
php -S localhost:8000then visit http://localhost:8000
- how classes work
- public private protected
- extends and override
- interface is like a contract
- autoloading with spl_autoload_register
- validating input with objects