Our First Exercise Using OOP PHP | Object Oriented PHP Tutorial For Beginners | PHP Tutorial

preview_player
Показать описание
Our First Exercise Using Object Oriented PHP Programming | OOP PHP Tutorial | Learn OOP PHP. In this PHP tutorial you will learn how to use object oriented PHP programming in a real project. The project you will create, is how to make a simple calculator in object oriented PHP programming.

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

Рекомендации по теме
Комментарии
Автор

It's really good to see that Dani's courses are helping a lot of you out there. I've already said what I had to on what I think about Dani and his delivery of the material. It is up there amongst the best teachers I've seen. I came on here because curiosity had got the better of me and because I too want to start my own youtube channel to help folks learn (php, python, front-end rwd, vanilla js, jquery, react.js etc) so I was looking at various devs and how they've gone about it.

I'm already comfortable with all of what is being shown to you folks in this course HOWEVER its always useful to listen to how a fellow dev explains these topics to others and sometimes its great to get a second pov/take on understanding something. This course was released 4 years ago and I feel I have my work cut out if I'm going to put out anything half as good as Dani's material lol

The-Great-Brindian
Автор

Thanks for sharing this tutorial. Really helped me with my assignment.

dhanikaamarasekera
Автор

For the people that get notice: undefined index errors, the issue is that php can not proceed with the code with the variables being empty, so we need to tell php to execute the code ONLY if the submit button is clicked, we can do this with the isset() function. so in order to do this :

1. In the index.php file add a name to the button for example <button type="submit"
2.in the calc.php file wrap everything in this code YOUR CODE HERE};

This should fix the problem.

mohammadelnayef
Автор

For newcomers like me - Finding such an example is a feat. Can you create a video series utilizing Oops - 5-10 such small projects will be wonderful.

Kodeispoetry
Автор

actually i think a better use can in this exercise would be using static methods add, subtract, multiply of calculate class without instantiating a class at all. just call the methods and pass the arguments.

file1:
class Calculate {

public static function add($argument1, $argument2) {
return $argument1 + $argument2;
}
}

file2:
require(file1)
$result = Calculate::add($num1, $num2);
echo $result;

GeneralA
Автор

good tutorial seems like i'm starting learning and exploring PHP oop, this make the separation of concern, reusable function if it's needed :D

armandocoralesbogayanjr
Автор

Hello Daniel, Please can you make a video of an entire OOP Project in PHP. probably an E-commerce Website or any other website that will further expose most aspects of the implementation of OOP in PHP

georgekule
Автор

Everything is perfect about this presentation ... awesome!

ahmedmusawir
Автор

Do you have more such other functionality examples for OOP's?

Kodeispoetry
Автор

wow! very nice; thanks for teaching us always

CENTCI
Автор

thanks for teaching us opticsorentidporgraming.

GauravSingh-qxuz
Автор

Very good tutorial ... but I this is the last video in the playlist , or I didn't get something ?

michaelkegeles
Автор

Is it really necessary to use $this->num1, $this->num2 etc.? Can't we just use $num1, $num2, $cal, which is passed from through the constructor?
I wanted to know if this is also a right way. Please guide me..


And thank you for the great tutorial. Simple and easy..

diljomathew
Автор

I said I wanted the strongest anime character.
*Yhwach Bach*

Perfection

antoniofuller
Автор

Do you have a login system based on php oop?

pianoLee-sxdx
Автор

Thanks.
I hade problem with "includes/ calc.inc.php", it was getting error, then i noticed I didn't create a sub folder like "includes", then I edited "calc.inc.php". SOLVED!!

skrezwan
Автор

i have the calc.inc.php and calc.php in the same folder but idk why the maximum time for exceution finishes and it gives an error on the include 'clac.php '; on calc.inc.php file

pariszarka
Автор

my calculator is returning an error, I tried to instead of returning an error as the default I decided to add two numbers as the default case and I noticed that its returning 0, and I dont understand why, everything seems to be in place, I even checked if the post method is working and it is, the variables are being passed down, but the switch isnt taking in the values I need your help

WinyMule
Автор

I do hate to pick holes but @11:38 2-1 - refresh =3 .... Or are my old eyes playing tricks?

surinfarmwest
Автор

Why do you have the actions next to the options of the "cal' property in the index.php page?
<select name="cal">
<option value="add">Add</option>
<option value="sub">Subtract</option>
<option value="mul">Multiply</option>
</select>

<button
I can't understand what they do...

donaldsingh
welcome to shbcf.ru