Тёмный

Learn Object Oriented PHP for Beginners | With Examples to Help You Understand! | OOP PHP Tutorial 

Dani Krossing
Подписаться 483 тыс.
Просмотров 69 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 177   
@dinaahmed92
@dinaahmed92 Год назад
"Believe me, I prayed to God that you would do an explanation of OOP. When searching for an old course for you, I found that you have done it. Thank you. From Egypt, Alexandria."
@X-factor6
@X-factor6 Год назад
Are you from Egypt? I was supposed to travel Egypt soon 😅
@Bosbay6902
@Bosbay6902 6 месяцев назад
@@X-factor6you are so creepy
@abdelrahmanabdallah6308
@abdelrahmanabdallah6308 5 месяцев назад
Me too 🙂❤️
@jon82hill
@jon82hill 5 месяцев назад
Yet another fantasitc video, i've looked at a lot of other videos for learning PHP, in particular OOP and how I can apply what I already know with proceedule PHP and re-factoring my code into OOP. Your style of teaching is amazing and for me makes much more sense, thank you :-)
@SystemDesignNepal
@SystemDesignNepal 11 месяцев назад
Glad to have you back on coding tutorials. Best RU-vidr out there for anyone who wants to learn about coding and security at the same time. I love mmtuts 😅
@whisperscribe
@whisperscribe 4 месяца назад
Love your explanation and teaching style!
@jestonibabas5290
@jestonibabas5290 2 месяца назад
You are always be my best teacher.. keep up
@abbasrahim723
@abbasrahim723 Год назад
Excellent Explaination!!! I really appreciate You Sir!!! ❤❤ From Pakistan
@LiteralHatReloaded
@LiteralHatReloaded 3 месяца назад
thank you so much!!!!!
@alexandergeorgesquire220
@alexandergeorgesquire220 3 месяца назад
Great spokesman. Well done
@Netvirux
@Netvirux 6 месяцев назад
"Hi Dani, I trust you're doing well. I've been working on developing a PHP script and I want to ask you something. I'm interested in implementing a server-side activation mechanism to ensure that users need to interact with my website or server before the script can be fully activated and used. Additionally, I want to make it challenging for users to modify or bypass the activation mechanism and ensure that I have remote control over the activation process. Could you please provide guidance on how I can build such a mechanism? Specifically, I'm looking for advice on: 1. Implementing the activation logic within the PHP script. 2. Enhancing security measures to prevent unauthorized modifications or bypassing of the activation mechanism. 3. Establishing remote control over the activation process to enable/disable script functionality as needed. Thank you in advance for your help!
@GautamRampalli
@GautamRampalli 2 месяца назад
Hey, is it necessary to have a constructor when we intend to use getter and setter methods? Kindly educate me on this.
@florisvandenberg7424
@florisvandenberg7424 6 дней назад
Nope. The purpose of the constructor is in principle to easily setup member variables. If you do this through setters, there's no need for a constructor.
@rousondas4111
@rousondas4111 7 месяцев назад
Thank You sir
@PechSoftware
@PechSoftware 11 месяцев назад
Hello Dani, I learned to use the MVC model with your tutorials a couple of years ago, I appreciate everything you teach in your videos, there is something that I could never do on my own and I researched it a lot but I can't find a way to do it. Using OOP and MVC, how do I ensure that a function that performs an INSERT in the database returns the ID of that INSERT? I tried every way to use lastInsertId but it doesn't work for me. Could you give me a hand with that? thank you.
@Sj-yf2jg
@Sj-yf2jg 2 месяца назад
Elon Musk tutorial version 😂. Love your tutorial videos bro
@ictkenyar
@ictkenyar Месяц назад
At 7:45,, oozing knowledge
@cardinapointz
@cardinapointz 11 месяцев назад
Well explained. Thanks bro.
@KonnarakYahath
@KonnarakYahath 2 месяца назад
❤❤
@rogelionovera8717
@rogelionovera8717 2 месяца назад
your make it similar name properties and the constructor parameter its hard to understand
@kibuzz3258
@kibuzz3258 Год назад
Where are you Dani? Where's your tutorials, they really helping me! When new videos, miss you
@youssefzaim7163
@youssefzaim7163 Год назад
dani is genius
@aeonizing
@aeonizing Год назад
Bro ily
@Alfenijonas
@Alfenijonas 5 месяцев назад
Why does everyone who shows OOP take the car's example? How tf should I use that on my website? I don't have cars in my HTML... Wouldn't it be better to show examples with DB connection? Text-areas? Other things? Why cars?
@Dani_Krossing
@Dani_Krossing 5 месяцев назад
It's because you need to understand "how OOP works". You gotta learn to walk, before you learn to run. 🙂 "Everyone" shows the car example, because it's a great way for people to understand how OOP works. If we just started teaching our viewers "practical examples" immediately, then it would fly over 80% of peoples heads, and they wouldn't learn OOP properly... Also... I'm guessing you didn't finish my video before commenting, seeing you are asking "why we don't show stuff like DB connection" hehe... 😉 I understand that OOP can be frustrating, but I promise that everyone feel that way at the start, and eventually it will seem extremely easy compared to Procedural PHP. Just keep cool, and take things one at a time, and trust the process when "us teachers", decide that it is best to learn the car example when starting out. 😊
@Alfenijonas
@Alfenijonas 5 месяцев назад
@@Dani_Krossing yes, but you can show starting examples with HTML DOM objects. Because we all use websites every day, and cars are real-life objects, so it is not truly helpful. And I am cool. Come on, I am learning OOP for free on Saturday, so that's awesome! 😁👍 I am just tired of the car's example. At least it could be girls...
@Dani_Krossing
@Dani_Krossing 5 месяцев назад
@@Alfenijonas 👱‍♀👱‍♀👱‍♀
@anasouardini
@anasouardini 3 месяца назад
So much redundancy, otherwise it's a good video.
@ashleywalls4097
@ashleywalls4097 10 месяцев назад
oop is the devil
@Dani_Krossing
@Dani_Krossing 10 месяцев назад
People always think that, until they start using it for larger projects, where Procedural PHP is a nightmare. 🙂
@ashleywalls4097
@ashleywalls4097 10 месяцев назад
@@Dani_Krossing been doing this 30 years. I stand by my statement.
@moraaoo4889
@moraaoo4889 11 месяцев назад
I didn't understand OOP in my first language and i understand this so easily with you , The issue is not in the language or the difficulty of the topic or my mind. I think it is in the simplicity of the style and the conscience of the person who explains. Thank you for your great effort.❤❤❤
@raizudu5813
@raizudu5813 9 месяцев назад
Excellent video. I pray that you will create a Laravel tutorial, and if it happens, I'm thrilled. Thank you once more for your tutorials, Dani. I gain a lot of knowledge. MABUHAY ka meaning I SALUTE you in filipino.
@tanny_edits
@tanny_edits Месяц назад
Who's watching this because Dani released a tutorial on Laravel?
@rodgence9641
@rodgence9641 Год назад
Thank Dan Drop likes from Africa please
@wadiibounenni4848
@wadiibounenni4848 6 месяцев назад
What kind of teacher you are ?! Thanks a lot for your efforts. Please make a Laravel Playlist if possible: It will be a fantastic journey for your subscribers and fans like me. (I sometimes click ads on your videos intentionally as a small sign of gratitude for what you are delivering. This is the minimum thing I can do :)
@Daleveloper
@Daleveloper Месяц назад
You're so good at explaining things! I'm really impressed. I'm switching to PHP for the job I applied for, and I'm hoping to learn it all in 12 hours. xD
@CsMuia
@CsMuia Год назад
Dani has a gift of making the difficult and challenging seem so easy. This is one of the, if not the best OOP tutorials on the planet. Thank you for sharing your knowledge in the subject area. Look forward to more tutorials.
@Dani_Krossing
@Dani_Krossing Год назад
Thank you so much 😊
@birsingh5388
@birsingh5388 Год назад
Please create simple Wordpress plugin by using OOP concepts
@amkamwebavenger3870
@amkamwebavenger3870 Год назад
I learned a lot from you, mmtut, back in 2016/17/18 when I started Web Development. Your tutorials helped me with all the fundamentals of designing website and building PHP websites. Even though I'm more of a JavaScript developer now, but I do miss your tutorials a lot. So happy to see your tutorial again. I'll definitely give some attention to PHP again so I'll build up my skills in PHP again and then move to Laravel. It would be great if you could do some advance tutorials on Laravel for PHP developers in your channel. Thank you so much for your tutorials and inspirations and all I learned from you. If I'm proud to be good in Web Development today, you helped set me up for who I'm today. Thank you and God bless you, Dani Crossing.
@SanyamJain08
@SanyamJain08 Год назад
Can u suggest me some good channel for JS...
4 месяца назад
@@SanyamJain08 Channel: Namaste Javascript
@RanaAdnan-b5v
@RanaAdnan-b5v 2 месяца назад
Thanks, a lot,,, it is very helpful to me.
@new-in8yt
@new-in8yt 5 месяцев назад
thank you man so much and i have a question 55:50 why you make it public and you don't make it protected ?
@Dani_Krossing
@Dani_Krossing 5 месяцев назад
It’s because signupUser() needs to be accessed from a normal PHP file, when creating the object. 🙂 Protected we use, when only parent classes should have access to the method. So “a class accessing methods from another class”.
@remasrebas3776
@remasrebas3776 11 месяцев назад
I'm so glad I found your page! You're helping a lot with your clear explanations. The best teachers are those who put themselves in the shoes of total beginners, and you're doing it so well.
@Starboy12328
@Starboy12328 19 дней назад
Dani... You are great teacher ❤❤❤
@mmelimahlobo7656
@mmelimahlobo7656 Год назад
Thanks Danni for gracing us with another great tutorial,highly appreciated😊
@mosesdwana9555
@mosesdwana9555 3 дня назад
you explained so clearly and to the point. thank you so much for sharing your knowledge. can you make a video to dive deeper into oop in php and Laravel? your Laravel tutorial is also very exceptional.
@mavisDev
@mavisDev 2 месяца назад
Good explanation sir. but i observed something from the setter and getter method you explained. wouldn't it be better if we set the brand first and then call the getter method afterward? Like this
@nasirmadni9183
@nasirmadni9183 5 месяцев назад
Love you from Pakistan
@ifastek
@ifastek 3 месяца назад
God bless you so much. Please keep up this good work in helping people understand things they consider difficult.
@realdaly
@realdaly 6 месяцев назад
48:36 incase somebody had the query fatal error it's because there's a typo in the sql query, just remove the single quote signs from around the table names from: ('username', 'pwd') to: (username, pwd)
@keylen_reynold
@keylen_reynold 2 месяца назад
Really appreciated :D
@subhadipmishra328
@subhadipmishra328 Год назад
Thank you Sir, please start Laravel series I'm waiting for this. ❤
@YK-dx4ux
@YK-dx4ux 3 месяца назад
I notice when you say PHP, you say PSP and, when you say fields, you say feels. Just something funny. Thanks for the vids!
@horizon6309
@horizon6309 5 месяцев назад
Very good video, thanks for sharing. I was missing seeing oop implemented in a practical example. So I appreciate the second part of this video.
@republicofserbia
@republicofserbia 10 месяцев назад
I don't understand why this video has only 20k views. It's a free and great course. Maybe this language isn't that popular, and I made a mistake learning it. I hope I'm on the right web development path.
@Dani_Krossing
@Dani_Krossing 10 месяцев назад
PHP is the top backend language for web devs, seeing that more than 80% of all websites are made with it 🙂 so you are not on the wrong path.
@jelivanlolz1187
@jelivanlolz1187 2 месяца назад
Why does my compiler not accept this attempt? It says dont use place holders on public functions. It's considered instantiating the same function again
@DemsRNutless
@DemsRNutless 6 месяцев назад
The amount of code that OOP can save is very high when citing generic classes and inheriting to more specific classes. That being said, there is a maintenance price for inheritance and polymorphism.
@JonEllis-mi4mc
@JonEllis-mi4mc Месяц назад
This is great just what I've been looking for before learning Laravel :)
@nisanka
@nisanka Месяц назад
As always, You are the best teacher !!!👍👍
@Seeker_747
@Seeker_747 5 месяцев назад
Thanks alot for the explanation our teachers at school always link towards your channel to understand things better
@NemanjaMarkovic-nq4vu
@NemanjaMarkovic-nq4vu 7 месяцев назад
I watched your video, tutorial, about OOP and for the first time everything, from 1st sec till the last is crystall clear and easy to understand. Hope you make more videos and tutorials. Thank you!
@itsyuupi
@itsyuupi 5 месяцев назад
I finished this playlist, and I'm so glad. PHP is very much the same as Javascript and others; it's just different to write. Thank you so much for sharing the knowledge.
@cooltechandmore
@cooltechandmore 6 месяцев назад
still confusing
@TerabyteTy300
@TerabyteTy300 6 месяцев назад
I couldn't possibly thank you enough for this video. The way nothing goes unsaid is remarkable in helping me understand every point without question! You are the best teacher I have come across yet!!
@user-pf8jj1uu1f
@user-pf8jj1uu1f 5 месяцев назад
I needed to seen an example with forms and OOP relation but this helps too, thanks much.
@chrisvanrooyen8982
@chrisvanrooyen8982 10 месяцев назад
Wow, thank you so much for this video. You have literally opened my mind to new possibilities and much better coding practices.
@samuelnjau8086
@samuelnjau8086 5 месяцев назад
Thanks 😊👍
@tina_5544
@tina_5544 Год назад
Have last exams in a few weeks and literally cant get anything from my profs presentations (they are very minimalist) so rly tysmm
@momenshtayeh67
@momenshtayeh67 8 месяцев назад
you are so awesome!! thanks for the playlist!
@billalbaiteche1531
@billalbaiteche1531 Год назад
thank you
@chopbar4951
@chopbar4951 Год назад
mad man this thing was so catchy able to get the lesson way better than other videos thank you for the teachings idol god bless you more :)
@joebazooks
@joebazooks 4 месяца назад
i wish u wouldve provided some better examples to which OOP is better suited. the sign up example that u provided is essentially procedural code inside an object, which seems redundant or like unnecessary complexity
@joebazooks
@joebazooks 4 месяца назад
really the only benefit of adding this extra complexity is the modularity of it
@md.arifmehedi6559
@md.arifmehedi6559 2 месяца назад
greate teach in a simple way ... May God bless you
@matthewjared8820
@matthewjared8820 7 месяцев назад
Thank you for your amazing teaching skills!:)
@abdelrahmanabdallah6308
@abdelrahmanabdallah6308 5 месяцев назад
47:16 How does it recognize the Dbh class even though we didn't include "Dbh.php"?!! Please answer Dani ❤
@Dani_Krossing
@Dani_Krossing 5 месяцев назад
We include the class later, when we need include both classes into the page we need to use them in. 🙂
@mickar200
@mickar200 Год назад
Wow the way you explain the code makes it so easy to understand definitely learned a lot from your video thank you very much
@sihemmansour5303
@sihemmansour5303 5 месяцев назад
Thank for this precious tutorial ❤❤❤
@Maxim99t
@Maxim99t Год назад
thank u dani!
@cryptoknight7256
@cryptoknight7256 Год назад
Hey Dani! I wrote a series of codes years ago using functions instead of classes, and that's a habit I kept. In terms of speed (execution) which is the best route? Functions or Classes? Thanks for what you do!
@Dani_Krossing
@Dani_Krossing Год назад
Functions are faster because it involves less encapsulation, however you need to consider the purpose of your code rather than speed, when we talk about "when to use classes or functions". For example, if you need something like a login feature, then because of the scale/size of that feature, it is better off to use classes. However if you just need a simple feature to show the current time on your website, then it would be overkill to use classes. So it's not about "if you should use classes or functions". It's about "what tools best suits the task". 🙂 I see too many PHP developers argue about "Procedural vs OOP", and they all completely miss the point. It's like arguing about "if a screwdriver or a drill is the better tool", which is silly since they each have their uses.
@cryptoknight7256
@cryptoknight7256 Год назад
@@Dani_Krossing Excellent. I basically use functions with APIs and Curl so I will not touch them then. I was asking about "execution speed" because I mostly interact with trading platforms, which require excecutions to be as minimal as possible :) Thanks again, Dani!
@patsdrone8646
@patsdrone8646 Год назад
Is it only me but there's no hyperlink in "➤ GET ACCESS TO MY LESSON MATERIAL HERE!" ?!?
@Dani_Krossing
@Dani_Krossing Год назад
It's a header. Go further down :)
@benchapple1583
@benchapple1583 9 месяцев назад
Always remember that a 'method' is not a function and it is written: function name(); You can see at a glance that it is NOT a function. I hope that is all clear now.
@florisvandenberg7424
@florisvandenberg7424 6 дней назад
Actually a method is a function, but one that is tied to an object.
@moeinmahmoud-yo6fp
@moeinmahmoud-yo6fp Год назад
Thank you Mr. Dani for this very useful course , you really made a hard efforts
@asimreyazuddin3494
@asimreyazuddin3494 5 месяцев назад
I couldn't find anything on polymorphism, or maybe I missed out somewhere from your content. Could you guide me here
@florisvandenberg7424
@florisvandenberg7424 6 дней назад
Polymorphism allows you to access derived methods from a base class. For example: class A { public function X() { return 10; }} class B extends A { public function X() { return 20; }} function f(A $object) { echo $object->X(); } $object = new B(); f($object); Without polymorphism, this would echo 10, because that's the implementation of X() in class A. With polymorphism, it will echo 20, because function f will understand that $object is of type B even though it is passed as type A. Under the hood, this is handled by adding a redirection table which contains pointers to the correct functions. Because of this redirection table, polymorphism is slightly slower. PHP uses polymorphism by default.
@AnkitMishra-h3n
@AnkitMishra-h3n 11 месяцев назад
Thanks a lot sir 🙏. It will help a lot, you are a great teacher.
@KAREKINFPV
@KAREKINFPV 11 месяцев назад
I can't not think of classes like css classes. Css ruined it for me.. don't learn CSS until you learn php i guess.
@Dani_Krossing
@Dani_Krossing 11 месяцев назад
It’s funny you mention it, because it never occurred to me they were the same names until now 😂
@KAREKINFPV
@KAREKINFPV 11 месяцев назад
@@Dani_Krossing haha thanks for the reply! I love your content! Great stuff!
@GuessWho189
@GuessWho189 Месяц назад
00:45 the real reason beginners give up , but u got it and said it in the beginning so i will watch the whole video now
@GuessWho189
@GuessWho189 Месяц назад
i am half way in this video so to speak i am at 31:32 and if you are a complete beginner to OOP and focus everything and listen to my master in PHP Mr Dani Krossing you my friend is no more a beginner in OOP. Thank you
@MohamedAhmed-lw3hm
@MohamedAhmed-lw3hm 3 месяца назад
Thank you very much you are the G.O.A.T
@dinaahmed92
@dinaahmed92 Год назад
you are the best🤍
@sksamassa95
@sksamassa95 9 месяцев назад
Thank you Dani. A lot of Love from Mali 🙏
@ictkenyar
@ictkenyar 29 дней назад
Thank you for this
@Stoney_Eagle
@Stoney_Eagle Год назад
Mission accomplished, the taskbar is full. 😂 I don't know how you don't get lost with all those icons. You can directly find apps from the start menu, press the flag key and type the first few letters and hit enter. 😉
@Dani_Krossing
@Dani_Krossing Год назад
😂 I like my taskbar chuck full of shortcuts though
@Stoney_Eagle
@Stoney_Eagle Год назад
@@Dani_Krossing you're a savage hehe
@aeryunclaycaluscos1242
@aeryunclaycaluscos1242 11 дней назад
Thank you Mr.Beast
@MarkoTH000
@MarkoTH000 10 месяцев назад
Top content
@vinay_dias
@vinay_dias 4 дня назад
Please upload more PHP
@killerboy5278
@killerboy5278 Год назад
sir we need more like how to use Ajax in php
@doganddev_funs
@doganddev_funs Год назад
In the futur you create tutorial for Laravel or Symfony for learn the next step in OOP PHP ? And thank's for you video :) It's perfect for understand the base of OOP simply. When a for advanced OOP ?
@Lyrik-Klinge
@Lyrik-Klinge Год назад
Thanks ... always VERY helpful!
@neid_1
@neid_1 Месяц назад
Thank you MrBeast )
@DarkNerdis
@DarkNerdis Год назад
please do not advise me, I am trying to make bones for a character in unity with a PNG image in the skinning editor, but when I try to move with them or adjust the structure of the body in edit geometry, copying starts as soon as I press the mouse.
@moritzschurmann4580
@moritzschurmann4580 Год назад
Hey! As i can see you get a desk that can adjust its height. Im beginning to study informatics and also im gaming alot and just wanted to ask you, if you could recommand a desk? Because also im moving out and im gonna get a fresh setup anyways :D Would you say those desks are worth their money?
@hackcodesfree9200
@hackcodesfree9200 Месяц назад
helpfull.
@sbhankord8591
@sbhankord8591 Год назад
@GerritforBazeja
@GerritforBazeja Год назад
Thank you so much! Making PHP easier. May I draw the conclusion; a login-systeem with OOP is safer way than with procedural PHP? Or just an other way to do it?
@sonahj2001
@sonahj2001 Год назад
In applying as a php developer, is it very important to master DSA? cause I think it would be better, especially these comes up with so many logics.
@TechtalkAi2762
@TechtalkAi2762 Год назад
We have just stared learning php oop in university I just found your course in RU-vid 😊thanks bro 😎 form Afghanistan 🇦🇫
@timoanjala4358
@timoanjala4358 3 месяца назад
Huge fan! You have very natural way of explaining these things! Waiting for more Laravel tutorials!
@aljongabrielambasvaldez
@aljongabrielambasvaldez Год назад
I hope you create a tutorial about the foreign keys I see that you used it on the comment tables :D, thank you from Philippines.
@_Oluwasegun
@_Oluwasegun Год назад
I love so much Danny. Thanks for your videos. We've been doing a lot of log in systems and Its almost like that's the only thing to do with PHP. Please can you do more projects with PHP this time
Далее
Should You Learn Object Oriented PHP?
13:48
Просмотров 11 тыс.
Трудности СГОРЕВШЕЙ BMW M4!
49:41
Просмотров 1,5 млн
С какого года вы со мной?
00:13
Просмотров 207 тыс.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
PHP doesn't suck (anymore)
10:48
Просмотров 207 тыс.
Learn Any Programming Language In 3 Hours!
22:37
Просмотров 410 тыс.
Coding Was HARD Until I Learned These 5 Things...
8:34
Kubernetes 101 workshop - complete hands-on
3:56:03
Просмотров 1,6 млн