Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

First Exercise in OOP PHP - Object Oriented PHP Tutorial

Dani Krossing via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn to build a basic calculator using Object-Oriented PHP in this 24-minute tutorial. Explore fundamental OOP concepts including classes, properties, methods, and error handling. Follow along as the instructor guides you through creating a calculator class, implementing calculation methods, and utilizing a switch statement for different operations. Practice passing properties, creating objects, and executing calculations within a try-catch block. Gain hands-on experience with file organization, HTML form integration, and practical application of OOP principles in PHP development.

Syllabus

Intro
New office
Index page
HTML form
Classes file
Inside a website
Checking for errors
Explaining calcinc
Creating the class
Creating the methods
Creating the properties
Assigning the properties
Passing in properties
Creating the second object
Creating the calculator method
Creating the switch
Changing the path
Creating spacing
Creating upper operator
Running the calculation
Running the trycatch block
Running the calculate method

Taught by

Dani Krossing

Reviews

Start your review of First Exercise in OOP PHP - Object Oriented PHP Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.