PHP OOP Tutorial | What is a PHP interface

  Рет қаралды 22,470

How to code well

How to code well

Күн бұрын

A PHP tutorial demonstrating how to use interfaces to make your code cleaner, reusable and adhere to certain solid principles. This PHP tutorial is aimed at PHP developers at a beginner level who are learning object orientated programming (OOP)
==== GET EARLY ACCESS TO FUTURE VIDEOS & TUTORIALS ====
Patron: bit.ly/2hmVKwX
======== RECOMMENDED PROGRAMMING RESOURCES ========
Manning programming books and courses: bit.ly/2BIrExp
PHP Books:
howtocodewell.n...
PHP Hosting from Cloudways:
bit.ly/2CB4mWD
======== MY PROGRAMMING COURSES ========
Docker in Motion: bit.ly/2vvz2sA
Skillshare courses: skl.sh/2gI33M5
Udemy courses: bit.ly/2iGhvIE
======== WEB HOSTING DEALS ========
Cloudways: bit.ly/2CKb79b = 20% off first 6 months
Digital Ocean: m.do.co/c/9d46... = $10 off
Linode: bit.ly/2CmoNq3
======== SUBSCRIBE TO THE NEWSLETTER ========
Join the Newsletter: bit.ly/2fPlG3v
======== FOLLOW ME ========
Blog: peterfisher.me.uk
Facebook: / howtocodewell
Instagram: / howtocodewell
Twitter: / howtocodewell
Pintrest: pinterest.co.uk...
Twitch: / howtocodewell
======== MY TALKS ========
How to put your Docker image on a diet: bit.ly/2y5KMly
======== SUPPORT THE CHANNEL ========
Become a Patron: bit.ly/2hmVKwX
Donate: www.paypal.me/...
Help translate the videos: bit.ly/2iEyxXB
======== VIDEO SETUP ========
Nikon D5300 Camera: amzn.to/2u5jreD
Logitech HD Pro Webcam C920 amzn.to/2C5NNVJ
CRAPHY Photography Studio Lights: amzn.to/2BThzOc
Rode Procaster Microphone: amzn.to/2sH2WJ1
Rode VideoMic Pro: amzn.to/2vmNF0D
Zoom H4NPro: amzn.to/2kZrrvo

Пікірлер: 131
@ifahddev1034
@ifahddev1034 5 жыл бұрын
I watched much tutorial for interface multi languages .. and i never understand why be should to use interface expect your tutorial I understand now, thank you so much ❤️
@howtocodewell
@howtocodewell 5 жыл бұрын
That's great to hear. I've got loads of programming tutorials on a bunch of languages so stick around. Please ask of you have any questions
@contabilidade00imperiocont95
@contabilidade00imperiocont95 6 жыл бұрын
Ok, this makes me look stupid but the truth is that I am a PHP developer for over a decade and never understood the purpose of interfaces. Yes, I have read a dozen of tutorials and stuff but yeah, it never broke into my skull. Your payment example just did the click in my brain. It further consolidated when you said at the end that there is no need for a bunch of if statements. Thank you mate!!!!
@howtocodewell
@howtocodewell 6 жыл бұрын
Hey I'm glad I could help. This is the reason I do these videos. It took a long time for me to understand OOP interfaces and it didn't instantly 'click' until I tried many examples. Now I use them on a regular basis. If you have any questions or suggestions for future videos then let me know.
@sageerahamed4447
@sageerahamed4447 5 жыл бұрын
Contabilidade 00 Império Contábil
@vineethmathews
@vineethmathews 5 жыл бұрын
Thank You Peter Fisher, I do very rarely subscribe to channels. But this video forced me to subscribe to your channel because this explained me in a simple and practical way of using interfaces in the real world environment. Thank you Jesus for leading me to this beautiful tutorial. God bless you. :-)
@howtocodewell
@howtocodewell 5 жыл бұрын
Thank you
@HaraldEngels
@HaraldEngels 4 жыл бұрын
I have watched many of these - but this is the best video about interfaces in PHP.
@howtocodewell
@howtocodewell 4 жыл бұрын
Thank you for saying that. 👍
@netxyz00
@netxyz00 4 жыл бұрын
Excellent example and explanation!
@howtocodewell
@howtocodewell 4 жыл бұрын
Thank you! :)
@Cellenta
@Cellenta 6 жыл бұрын
It helped me now to understand the reason why to use interfaces. Thank you! :)
@howtocodewell
@howtocodewell 6 жыл бұрын
Thats great. I'm glad it helped. Is there anything that you would like me to cover in future tutorials?
@realQkstar
@realQkstar 5 жыл бұрын
2:52 the genuine way is always The English way.❤
@solomonnwezeD
@solomonnwezeD 5 жыл бұрын
What I captured very well in this tutorial is that interfaces are mainly setting rules for your classes, but from the code you wrote about the payment gateway, don't you think I can decide not to use interface as I will write all the methods that is needed for the different classes and call the methods inside the process method for each of the classes. I will now call the process method for any of the classes in the paymentGateway Class because they already all have process
@solomonnwezeD
@solomonnwezeD 5 жыл бұрын
please I need a reply peter fisher, thanks
@howtocodewell
@howtocodewell 5 жыл бұрын
Hi Solomon, I'm not exactly sure what you mean. An interface defines the contract between two or more classes. An interface does not define the behaviour of the contract but defines the inputs and outputs.
@solomonnwezeD
@solomonnwezeD 5 жыл бұрын
@@howtocodewell good one, understood, thanks very much
@howtocodewell
@howtocodewell 5 жыл бұрын
@Solomon nweze you're most welcome.
@DarrellWoolfolk
@DarrellWoolfolk 2 жыл бұрын
@@howtocodewell then what’s the point of a contract if your code already agrees on how it’s classes would work since they have the same name methods. The process class seems to do what the implement class would do by passing the class you want into it since you already instantiate the class beforehand? Or Am I wrong to think that way.
@parijke
@parijke 5 жыл бұрын
Excellent example to explain the principles.
@howtocodewell
@howtocodewell 5 жыл бұрын
Thank you
@mackynyxz
@mackynyxz 4 жыл бұрын
Nice tutorial! very straight forward in explaining Interface!
@howtocodewell
@howtocodewell 4 жыл бұрын
Great. glad you found it helpful
@SnGrg
@SnGrg 4 жыл бұрын
Great lesson, though 1 confusion. Where you implemented the third interface just to implement the process(), so that fraudCheck() could be housed, would it not have been easier to include fraudcheck() inside pay() function for MintFee class Like public function pay() { $this->fraudcheck(); } thanks.
@rimantasdanilevicius6754
@rimantasdanilevicius6754 3 жыл бұрын
Thats was great tutorial. It made better understanding about interface in OOP. I wish to see more such clear and extended with good examples tutorial. What I missed is just how to organize folders and files, because I have been taught that Class file should have only class, and in this example it seems too many classes, so it makes a little bit confusing. Great teaching approach.
@howtocodewell
@howtocodewell 3 жыл бұрын
Thank you very much. I’m part of the Live Coders team on Twitch and do a lot of these longer examples. I publish these to the Archive channel kzbin.info you may find some helpful examples there
@rimantasdanilevicius6754
@rimantasdanilevicius6754 3 жыл бұрын
​@@howtocodewell Thank you for additional info. I saw that you are on youtube already 8 years and I will definitely will check more your videos. By the way, maybe you have somewhere tutorial how to update old version php to php8. I use Apache/Xampp, windows. I find some tutorials on youtube, but reading some comments it seems some people get errors. Thank you again for your time and lessons : )
@syafiq55555
@syafiq55555 5 жыл бұрын
You actually helped me a lot in understanding not only interface.. But the true purpose of it which focusses on cohesion and coupling. I knew a good principle of design is to have high cohesion, low coupling.. but still don’t know how to implement it in a system... thank you for your explanation. By doing this way, it will be easier to modify the system in the future. Better lecturer than my university’s lol
@howtocodewell
@howtocodewell 5 жыл бұрын
This is exactly why I do these tutorials. Thank you so much for your kind words. This inspires me to do more tutorials and courses
@mrcheesee5336
@mrcheesee5336 2 жыл бұрын
Very good explained - thank you!
@CodeLabArtisan
@CodeLabArtisan 4 жыл бұрын
Very much useful and helpful great video
@howtocodewell
@howtocodewell 4 жыл бұрын
Glad it was helpful!
@Nestumk
@Nestumk 7 ай бұрын
thanks for great lesson
@howtocodewell
@howtocodewell 2 ай бұрын
You’re most welcome
@ProgramoZ
@ProgramoZ 6 жыл бұрын
Great explanation Sir . I watched some videos about SOLID principle and if I am not wrong , the example shown in this video is Interface Segregation . Waiting for full in-depth tutorials with examples about SOLID in PHP . thanks again for this video .
@howtocodewell
@howtocodewell 6 жыл бұрын
Yes this does (or at least the last example does) fall into the category of ISP or the interface segregation principle. I didn't label it as such because it's quite an advanced topic and this was meant for beginners. I do plan to do a whole course on the solid principles at some point but first I want to lay the foundations.
@ProgramoZ
@ProgramoZ 6 жыл бұрын
yes...I will be waiting for that series .
@vlaellayug9937
@vlaellayug9937 5 жыл бұрын
@@howtocodewell this vid is super great. Have you published the whole course regarding the solid principles?
@howtocodewell
@howtocodewell 5 жыл бұрын
No not yet. I've been working on other projects but it's on the list of things to teach 👍
@vlaellayug9937
@vlaellayug9937 5 жыл бұрын
@@howtocodewell willing to wait. :) Thanks && Goodluck!
@lawrencerosen7113
@lawrencerosen7113 4 жыл бұрын
I have tried to understand bits of "oop" whenever I came accross them. Most high level presentations left me with "When would I ever want THAT?". This particular film took me to the point I was really interested in. It just remains to say "Thanks for publishing it"
@howtocodewell
@howtocodewell 4 жыл бұрын
Thanks Lawrence! I'm glad you found it useful
@vijayanpn446
@vijayanpn446 4 жыл бұрын
Hii.. I have a doubt on 16th line.. why we add circle on "public function addshape(circle $shape){}" ? If i remove that circle it will also work without issues...
@lawrencerosen7113
@lawrencerosen7113 4 жыл бұрын
@@vijayanpn446 Imagine this - We all have to pay bills and so I have a whole development team to handle this. They tell me they can interface to EVERYONE I need to pay. I send them off to write the servers and produce a single version of a client that contacts them all in the same way. For example, my generic interface accepts user-questions so I will call it "ItemToPay". Here are some examples: * Who are you? * What is my payment history? * When was last payment due? * When was it paid? * Did it go through? The whole project succeeded, so for the past two years, "Bill Explorer" takes many (pre-tested) servers such as "gas", "telephone" and "newspapers ". Now along comes a "seriously expensive" Hardware Shop. Do I rewrite the "Bill Explorer"? No, someone finds out to talk to the Hardware Shop, so that they fully support the same "ItemToPay". Once that works, there will be new instances of "ItemToPay" that I can provide to my client and NOT rewrite anything else!
@JanVSt
@JanVSt 5 жыл бұрын
Thank you very much! It helped me understand interfaces.. Great tutorial!
@howtocodewell
@howtocodewell 5 жыл бұрын
Great, I'm glad it helped
@Dani-si8ie
@Dani-si8ie 4 жыл бұрын
Coming from Swift, this is basically Protocols. The idea is pretty much the same, the naming is obviously different, interfaces sounds very tricky. But thank you for the explanation, i watched that in other classes and yikes, didnt really get it
@howtocodewell
@howtocodewell 4 жыл бұрын
Thank you. I've never used Swift before so I couldn't comment on the comparison
@elizavetawallace4356
@elizavetawallace4356 5 жыл бұрын
Very useful tutorial! Thanks
@howtocodewell
@howtocodewell 5 жыл бұрын
You're very welcome. Please let me know if you have any questions
@kajetandziebaj6405
@kajetandziebaj6405 6 жыл бұрын
Thanks, brah. I understand interfaces now.
@howtocodewell
@howtocodewell 6 жыл бұрын
No worries. Glad it helped
@HlongJuice
@HlongJuice 5 жыл бұрын
me too thank you
@natnaelghirma2617
@natnaelghirma2617 2 жыл бұрын
Thank you. This was good.
@busyrand
@busyrand 6 жыл бұрын
RUN PHP!!! Awesome Mug!
@howtocodewell
@howtocodewell 6 жыл бұрын
Yep great mug. I'm drinking tea from it now!
@BakiYuku
@BakiYuku 3 жыл бұрын
What is the theme you are using for your IDE? The coloring looks kind of neat and clean:)
@howtocodewell
@howtocodewell 3 жыл бұрын
This is a dark theme in phpStorm. I think it’s called Dracula 🧛‍♂️
@kleverestcompany1800
@kleverestcompany1800 5 жыл бұрын
@Peter Fisher I wonder if is a good idea to use a trait instead of 2 more interfaces to give the extra functionality FraudCheck to the class that need it ? I would appreciate it if you reply me
@howtocodewell
@howtocodewell 5 жыл бұрын
Great question. An interface cannot define the method body whereas a trait can. An interface is used to define the contractual obligations between multiple classes. We couldn't use a trait in this case as the body of fraudCheck was different between the classes however the implementation was the same. This has given me a great idea for a trait Vs interface video so I can demonstrate this
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
2020 and PHP is not dead and it's more alive than some other technologies! Has anyone heard anything of ruby for a while?!
@howtocodewell
@howtocodewell 3 жыл бұрын
Sometimes I miss the old Ruby days
@wtransporter
@wtransporter 4 жыл бұрын
I have similar situation like this. Question is: when to use constructor and accept object to do the job instead of local method? For example, instead of threeDCheck and fraudCheck to pass their objects?
@howtocodewell
@howtocodewell 4 жыл бұрын
I wouldn't use the constructor to do any business logic if that's what you mean. Make the methods do the hard work.
@wtransporter
@wtransporter 4 жыл бұрын
@@howtocodewell Thank you for answering. I agree with this. But what I mean is this: new SomeClass(ThreeDSecureCheckInterface $threedCheck), constructor accepts $this->threedChecker = $threedCheck and than we have local method doSomething(){$this->threedChecker->ThreeDCheck()} This is what I meant. Instead of example in PayFee class where we implemented Interface on 24:46. What if we have to implement threeDCheck interface in multiple classes? We repeat code? SRP, interfaces... I am trying to understand this things...
@Juli-sp8kj
@Juli-sp8kj 6 жыл бұрын
Thanks for your explanation! Only interface tutorial I have understood :D
@howtocodewell
@howtocodewell 6 жыл бұрын
That's great to hear. Do let me know if you have suggestions for future tutorials. Happy coding
@Juli-sp8kj
@Juli-sp8kj 6 жыл бұрын
Thanks for replying! Do you have any tutorials on using OOP with databases?
@howtocodewell
@howtocodewell 6 жыл бұрын
I have course/playlist on using MYSQLi which is the PHP OOP way of accessing MYSQL: kzbin.info/www/bejne/rXKVeH9mlrudhqM
@skell_jams
@skell_jams 6 жыл бұрын
Really really great stuff. Do you do more of this?
@howtocodewell
@howtocodewell 6 жыл бұрын
Hi +Sean Kelly yes I sure do. Tuesdays I do a tutorial like this Friday's I talk about web development/career/freelance Certain Paterons get early access to videos and can join my discord server to get coding help www.patreon.com/howToCodeWell
@borisnaftaliev3602
@borisnaftaliev3602 4 жыл бұрын
Great lesson, thank you for sharing.
@howtocodewell
@howtocodewell 4 жыл бұрын
Great to hear you found it helpful.
@Killer24nl
@Killer24nl 4 жыл бұрын
Excellent tutorial, thank you very much!
@howtocodewell
@howtocodewell 4 жыл бұрын
I'm glad you find this helpful. :)
@raphaelandrade555
@raphaelandrade555 6 жыл бұрын
In the case of shapes, couldnt you just use an abstract inheritance with abstract functions instead of interface?
@howtocodewell
@howtocodewell 6 жыл бұрын
Yes you could.
@raincloud1898
@raincloud1898 3 жыл бұрын
Thank you! Very helpful example! I'm quite new to the matter but after implementing "PaymentProcessInterface" shouldn't we get rid of the other three interfaces as I don't see any reason to use them in this case? Maybe we could declare them as normal classes and extend them in the payment type classes if needed? Many thanks for your help!
@tommyvid633481
@tommyvid633481 6 жыл бұрын
This is a great explanation. Just one thing. In the first 10 minutes with the shape example, you added ‘shape interface’ as a parameter in the addShape method. What does this do as I believe this would still work with only $shape as the argument?
@howtocodewell
@howtocodewell 6 жыл бұрын
Yes just having $shape as the parameter would work in that instance but you are losing out on DataType checking and IDE hinting. Plus You are allowing any type of shape into the method. If this class was in another file and created by another developer you would probably get confused as to what $shape represents. Interfaces make the code more readable as you know exactly how that interface should behave (What methods that class implements)
@tommyvid633481
@tommyvid633481 6 жыл бұрын
Peter Fisher that’s great. I get what you mean - it’s just like really strapping down your code and making sure it really works well to a fixed set of rules that are made flexibly by enforcing good usage of interfaces. Thanks again.
@llBestBoyll
@llBestBoyll 2 жыл бұрын
nice video man
@rw7799
@rw7799 6 жыл бұрын
i thought duplication was a bad thing..is there a better way to put the three shapes in the same class or call them with the same attributes somehow? i like the format of code and you on same screen..alot easier to concentrate. thx
@howtocodewell
@howtocodewell 6 жыл бұрын
Duplication is a code smell but that doesn't mean the method names of each class needs to be unique. Using interfaces we can segregate our classes whilst enforcing the behaviours of those classes.
@rw7799
@rw7799 6 жыл бұрын
so do you need to name circle, square, line as seperate classes or cant you put them into 1 class if they do the same thing? tbf it doesnt really matter ha
@howtocodewell
@howtocodewell 6 жыл бұрын
In this example they can all be in a single file but you would normal have one class per file
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
@@howtocodewellhe asked about classes, not files -> of course, if they do the same thing, then omit the redundant classes :)
@wdseelig
@wdseelig 6 жыл бұрын
Peter, Is the code in this tutorial available on github? Searched for it and didn't find anything?
@howtocodewell
@howtocodewell 6 жыл бұрын
Hi yes it's here: github.com/pfwd/how-to-code-well-tutorials/tree/master/tutorials/php/oop-beginners/interface I need to think about how to link to the code better. I was thinking of having one repo per tutorial series/course but that would be a huge amount of repo's.
@wdseelig
@wdseelig 6 жыл бұрын
Thanks very much for this. And, since I didn't say so earlier, thanks for this tutorial. I've been looking for an explanation of interfaces for quite some time and this is by far the best example I've come across.
@howtocodewell
@howtocodewell 6 жыл бұрын
Your very welcome. If you have any suggestions for future tutorials hen let me know
@rw7799
@rw7799 6 жыл бұрын
where do these functions go in your code?..do you use 'includes' to call them?
@howtocodewell
@howtocodewell 6 жыл бұрын
You could use PHP autoloading and/or require_one
@rw7799
@rw7799 6 жыл бұрын
require_one 'function.php' ; thx for term.this explains it. kzbin.info/www/bejne/jHSYeYBmf5WSjNE
@thomasvarghese744
@thomasvarghese744 6 жыл бұрын
Thanks for the great tutorial. There is a confusion I am having about the object you declared for the payment gateway example. Since you created an object only for mintfee and passed it how will other 2 class methods will be code. I tried to run the code you have given and only the mintfee class methods are called. Can you explain that and clear the doubt?
@howtocodewell
@howtocodewell 6 жыл бұрын
Hi Thomas, have you compared your code to what is on GitHub: github.com/pfwd/how-to-code-well-tutorials/blob/master/tutorials/php/oop-beginners/interface/example_2.php It should work as each Payments type has a process method.
@chrismarceljames
@chrismarceljames 6 жыл бұрын
I'm just seeing this video and I appreciate your simplified explanation, I just read a source on Dependency Injection and how ir eliminates tight coupling. This looks quite similar to what was implemented in the source I read. Could your example be likened to a somewhat implementation of Dependency Injection.
@howtocodewell
@howtocodewell 6 жыл бұрын
Without reading it myself I cannot say for sure. However this does help to reduce coupling of code, features and responsibilities within a system.
@chrismarceljames
@chrismarceljames 6 жыл бұрын
Here is the link to the post php-di.org/doc/understanding-di.html My next question is this, instead of using Interfaces, could we have used Traits? I was assuming that, since Traits also helped in solving the limitations of PHP not supporting multiple inheritance. Thank you.
@howtocodewell
@howtocodewell 6 жыл бұрын
Great question. An interface is like a contract between two people. The contract states what is required by the class to fulfill its responsibilities. A trait cannot be instantiated and nor can it implement interfaces. It is simply telling PHP to drop a set of functionality into a class. So its a question of design. Both have pros and cons. ... There is an RFC about traits with interfaces wiki.php.net/rfc/traits-with-interfaces
@rw7799
@rw7799 6 жыл бұрын
you know you use an interface to be able to swap between different classes... wouldnt a drop down menu on the users side do the same? or is this what the interface allows you to do on the users side?
@howtocodewell
@howtocodewell 6 жыл бұрын
I'm not sure what you mean by the 'users side'?
@rw7799
@rw7799 6 жыл бұрын
i always see these tutorials as apps with a real user at tother end of the code.. so i see users side as if this was an app you were designing where a real person is using the app to create shapes.. does that make sense. so a drop down menu would dynamically change circle square line on select of one of these shapes the code would fire, thus taking away need for an interface
@howtocodewell
@howtocodewell 6 жыл бұрын
You should still use interfaces as these will enforce the behaviours of future shapes (From a code perspective). I would think more about designing the classes in OOP and less about the overall GUI.
@carlortiz5181
@carlortiz5181 6 жыл бұрын
Why don't you just put the fraud checking method inside pay method?
@howtocodewell
@howtocodewell 6 жыл бұрын
Fraud checking and payment are two separate processes and have their own responsibilities. Also having them separate makes testing easier.
@carlortiz5181
@carlortiz5181 6 жыл бұрын
Make sense. Thank you.
@rahifirobinson9991
@rahifirobinson9991 6 жыл бұрын
Hi, do you know a few emerging trends respect to php interfaces?
@howtocodewell
@howtocodewell 6 жыл бұрын
Hi, How do you mean emerging trends? A PHP interface is normally used to define how other classes should integrate with the rest of the application
@rahifirobinson9991
@rahifirobinson9991 6 жыл бұрын
The question is to perform a research on any emerging trends with respect to creating PHP interfaces and use this knowledge to add luster to your interface
@rahifirobinson9991
@rahifirobinson9991 6 жыл бұрын
Can you help me with that?
@howtocodewell
@howtocodewell 6 жыл бұрын
Sorry for the delay. I'm not really sure what you mean by luster. Soon I will be creating a tutorial using PHP interfaces with Symfony services which may be of interest
@jasondavies3772
@jasondavies3772 4 жыл бұрын
Traits, its as simple as that.
@rohitsagar9011
@rohitsagar9011 3 жыл бұрын
😑 omg I m so confused between abstract and inteface
@howtocodewell
@howtocodewell 3 жыл бұрын
Jump on a live stream or the Discord server and we a can discuss it.
@rohitsagar9011
@rohitsagar9011 3 жыл бұрын
@@howtocodewell link ?
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
You were confused about this yourself, it's obvious from your hesitant explanation, not very good.
@howtocodewell
@howtocodewell 7 жыл бұрын
Today's tutorial covers PHP interfaces! Interfaces are the very important for object oriented programming. Let me know what other OOP subjects you wish me to cover in future videos
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
you could also make videos about different paradigms, if available for php
@howtocodewell
@howtocodewell 5 жыл бұрын
Good idea I will look into to that
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
oh dear - php is just awfull.
@howtocodewell
@howtocodewell 5 жыл бұрын
Why do you say that?
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
​@@howtocodewellmainly bc. of the lack of typing, as soon as you hit array like structures you don't even have a chance despite IDE and PHP 7. Also php lacks a lot of useful features. The community seems to have shrunk.
@howtocodewell
@howtocodewell 5 жыл бұрын
Can I ask where you are from? In the UK the PHP community is still buzzing. Perhaps it's different in other countries. I'm a Python and a PHP dev (I also dip my toes into other/more strictly typed languages from time to time) Tuples and lists can also be frustrating to use at times. Especially if they are not cleanly defined. But I best what you are saying about PHP arrays.
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
@@howtocodewellI am from Germany - but I was not talking about the local community, but the online one. I feel like there is really little content about php later than 5 or modern concepts in general. I switched from arrays to github.com/php-ds/ext-ds ;) (Unfortunately still not typed, but without generics and code generation this is probably the best one can get) And I come mainly from C++, C#, Go, TypeScript (in descending order)
@howtocodewell
@howtocodewell 5 жыл бұрын
I've never heard or used that extension. I may check it out. Thanks.
PHP OOP Full Course
1:22:47
How to code well
Рет қаралды 115 М.
Шок. Никокадо Авокадо похудел на 110 кг
00:44
When to use Traits, Interfaces, and Abstract Classes in PHP
15:08
Andrew Schmelyun
Рет қаралды 20 М.
Who is a Senior Developer, Anyway?
7:30
Laravel Daily
Рет қаралды 7 М.
PHP traits in depth with examples - OOP in PHP | Part 9
30:53
The Codeholic
Рет қаралды 13 М.
PHP REST API From Scratch [1] - Database & Read
32:18
Traversy Media
Рет қаралды 511 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 817 М.
PHP OOP -  Beginners Crash Course
24:05
Traversy Media
Рет қаралды 159 М.
From React To HTMX
40:01
ThePrimeTime
Рет қаралды 328 М.
PDO Crash Course (PHP)
45:35
Traversy Media
Рет қаралды 277 М.