User:Encore007/sandbox

The following is a basic example of object-oriented programming in PHP 8:

This program outputs the following: Students: Hello, my name is Alice, I learn Computer Science Hello, my name is Bob, I learn Computer Science Hello, my name is Charlie, I learn Business Studies Teachers: Hello, my name is Dan, I teach Computer Science, Information Security Hello, my name is Erin, I teach Computer Science, 3D Graphics Programming Hello, my name is Frankie, I teach Online Marketing, Business Studies, E-commerce