I think these days, the days of PHP 7, saying that PHP is bad or ugly is just naive. PHP went to great direction and is now a very mature language. Along with extra tools, namingly linters, you can produce beautiful code with PHP.
I'd like to point out that PHP isn't used strictly for web development. You can also use for pretty much anything python can do given you have the right extensions installed. Take this project for example: github.com/pmmp/PocketMine-MP, it is a Minecraft server written in php (the most popular software available for the pocket edition version). Whilst php is most commonly used for web development you can configure an environment to achieve pretty much anything most other higher level languages can.
AWESOME talk. I am currently learning laravel and I definitely appreciate the people who have put their work into it. ALSO. Please make a docker video. preferably using laravel and vue as the dev env.
I find one advantage of PHP over Python is the transportability of knowledge. most general functions in the language family work the same no matter the implementation. substr works the same in C, PHP, JavaScript .... Python brings a whole new syntactic language to bear. If you are generating complex web development, you still have to learn the C structure for JavaScript. I found working with Python and PHP simultaneously rather difficult. With almost 40 years in programming, your advice is absolutely the best I have heard.
I think what really made it hard for php was that you could mix html and PHP into the same file so you pretty much were interweaving business logic with view logic. I think with the rise of frameworks this has helped php developers write cleaner code. Also with php-composer it finally brought a package manager with php.
which language to use? it does not really matter. these languages copy each other. well, mainly php copies everyone else, but still. there's lambda functions in both of them now, generator functions, etc. the main thing i do not like in php is the semicolons that are a requirement at the end of each line ;) otherwise php is clearly based on c (syntaxwise, but there are exact fn names as well from c like printf for instance). What I like in python is that it feels very clearly thought out and designed from the outset. PHP was ahacked together pile of code written in c/c++ in the beginning that worked, but worked as a hack. No clear design goals were laid down just that it should do what the coders could think of they need. Of course it is no coincidence that python3 made some non backwards compat. changes compared to python v2, but it is still much more well designed than just any other language I can think of now (well I don't know too many, just around 10 or so). I think it is more important is what kind of sentiment is behind a language (many people use or not), what kind of problems it is being used to solve, what kind of modules / plugins / frameworks / etc it is being used. Python is much more general, but also there's django, bottle, flask, cherrypy, pyramid, web2py (these are just web frameworks), django-cms, wagtail (cms), odoo (erp), etc. The video is good, I liked it.
I start my php with Laravel and PSR standard, try invest time to django but concept look awful for me. Php still far neat for me at the moment. Background from C.
PHP can be very messy for early learners. I just wrapped up a major refactor to clean up some old PHP code. Took 8 repeated files & turned it into an API to handle the differences. Funny part is, the refactor is probably just as difficult to understand as it was before, just because of the mere fact that an API isn’t the easiest thing to work with when written with controllers & models to make it more modular and more easily expandable using more classes or input adjustments. It also added in better security and validation, which further added to the complication. The organization and structure of the code is much cleaner, however, and easier to follow along with - it’s also well documented this time on how it all works and how to expand on it, this is very important! As for Python, I’ve only worked with shell scripts, which is as close to Python as I’ve gotten. This video had me intrigued to see if python was worth contemplating using for more projects. Not seeing anything i’m working on atm that python would work better for.
Thanks, bro. I love php. I'm a very recently self-taught 45 year old hobbyist, and just built a simple php gallery for a friend. It took no time to build the site, but got stuck on php mailer. I wasted a week trying to figure out how to get it to work, and no luck. I built my first site, and can't finish because of the contact form. The more I read on line, or watch tutorials, the more confused I am. Seems there should be an easier way to send an email.
oh bro! I almost die while laughing at your comment because I can relate to your ordeal , very painful and frustrating, I must admit. Yours was only a week; mine was a month plus. It got to a point I was almost about crying. As a self taught developer, it was more frustrating cos there was no one to turn to for help. Tutorials could not help directly, stackoverflow too, etc. Until eventually I conquered it but it drained me, honestly, to say the least. Explain your challenge, I might just be able to help out.
Thanks Brad for a great unbiased and informative video. I'm watching this about 4 years after it was uploaded and it still felt like very relevant info.
Just tried to cheer Antonio to type code more and via that succeed his goals :) Antonio more about concept of PWA from ua-cam.com/video/z2JgN6Ae-Bo/v-deo.html and about AMP ua-cam.com/video/lBTCB7yLs8Y/v-deo.html :) Mainly make better browser based applications to serve people with they needs.
Although PHP is very well known for its use in web app development, that is not the only thing it's used for. PHP actually has a CLI version that has little to do with web app dev and I've seen plenty of professionals use the CLI.
I'm following your videos..& I found you an amazing tutor..but after watching this video .. I can conclude. Brad you are great human being also.... I mean u are pure soul ..
Using python for web development is a nitch, and often really isn't directly used to write pages. Python equally allows for poorly written code, I do not see your point there other then formatting wise which is what most people have a issue with python with. Keep in mind I use both as well. I find python really really easy, often I use it for prototyping how ever it is really a powerful language. spaghetti code is a phrase older then php, and it refers to code that is all over the place with no commenting or clear indication of what is going on. It is commonly used to describe newbie coders code with object orientated programing that commonly don't program objects correctly. It can also refer to making code over complicated when there is a simple solution that is better in some way such as optimization. Python's strick code structure often conflicts with various coding practices that are norms. Such as a prototype description, and line spacing gaps for clear visibility. Honestly I have used php to do more then just build database driven web apps. I also use it to store general varibles and modify code based off that. Example if I want something censored at a specific time of day, I could use javascript yes, but view that source code and the information is no longer hidden. Mean while I could hide private information behind a password that is in php and isn't in a actual sql db, and no user can see it unless they get remote access to my web server.
PHP is NOT ONLY for websites!! Do not make people wrong. You can use it in other scenarios, for instance as text processing script, ETL, WebServices (I wrote solution to exchage more that 80.000 messages daily)... whatever.
As far as syntax, "curly braces vs indentation" Brad, I can tell you you'll probably like more what you began with. You started out with PHP, so you like that syntax with curly braces. Me on the other hand started out w/Python and had a lot of trouble adapting to the braces. Although I'm writing a lot more Javascript (thanx to you), I still get frustrated with the curly braces at times.
It is not bad to go with more than one language, as example, I started with JavaScript then I learned php, now I'm using both of them based on the project needs. - JavaScript : VueJS, Angular 2 +, Ionic, NativeScript, ElectronJS and near I will start learning NodeJS/MongoDB - PHP/MYSQL: WordPress CMS and Laravel After you learned and created some project with a language you can pick another one to learn and go with it.
From a lot of place, online resource(W3, MDS, Stack Over Flow...) Books(javascript the good parts) UA-cam, Udemy and more... But, there is really a great tutorial from Brad on Udemy : Modern JavaScript From The Beginning
@@MouradBougarne try also swoole with php. Php is very fast, but with swoole php will be even many times more faster than node js. Also try react php. This is also good for realtime app.
I think , as i saw popularity grow in last years , i came to a reason that is highly dependent on open jobs . With python ,i think , application you created with, is corp level application based on popular invest direction . PHP is more entrepreneur based independent workflow . :)
A side note, PHP was intended for web development, however, there's a less known tool... the php-cli in which it can be used as command line tool much in the same ways as pearl did and I guess... python aswell, not sure how that would go...
many does not know it, but php is very capable at machine learning. actually php's machine learning libraries equally performed with python's ml. with php having jit, i expect php to surpass python at machine learning. here is a good machine learning library for php rubixml.com/
I started with .NET C# & Java, but I find those languages too clunky. I like Python and NodeJS (or JavaScript). I'm also looking into Flutter and that looks very interesting.
@@amirhosseinahmadi3706 I started off with Java 6 & 7, and at that time they were really behind the rest of other languages lacking shortcuts like lambda expression. With C# 4.0, it was getting there but I find that NodeJS with ES6, and another dynamic type language like Python, it was so much easier for me to write code. Now that I'm working with .NET Core, the language is getting very similar and close to that of Javascript & Python; and vice versa with the intro of TypeScript.
Having a preferred language is fair enough but a language is a language, they all have a purpose, learn the ones you need, coders complaining about languages is kinda like mechanics who complain about all French cars "they break all the time! metric and imperial bolts on the same parts! They have no clue!" Yeah that's nice, just fix the car would ye? Same with us coders, just write the code, opinions are like fingers, everyone has them and they always get pointed everywhere. Learn stuff, write stuff, job done really ;-)
"Even if that source is as great as you are". I don't take this as boasting, it's as clear as day that you sure know the industry. I like your logo animation, it's simple but elegant, keep up the quality work.
Dude you nailed this one, I really liked the way you put forward the advantages of both, could you do a Node vs PHP and Node vs Python video too ? I have started backend dev with Node but I don't think anyone is using Node for large scale, more like for small APIs of a big system are based on Node I think, PHP still has so many jobs, I was thinking of learning some PHP and then going full on Laravel and Node
I haven't committed to learning Python even tho I have an obsession with learning different languages because I haven't figured out its purpose other than being a different language to learn. With PHP and Javascript, I know what it is useful for since the first code language I learned was html. I am a webdeveloper and I haven't seen any content yet on how Python is used in web dev. This vid was very helpful because it is clear to me now that Python is probably not a language I will use except if I just wanna have fun learning another language.🙃😉
Words of wisdom. In said context what is your recommendations for someone specializing in Angular looking to start doing side freelance projects but has no back end experience? PHP route (i.e. Wordpress)? Python? Node? What types of projects are popular?
As you mentioned, when doing OOP, both languages are fine. To be fair, Python can get very messy if you take the procedural route. However, Python has what is called kwargs (keyword args) - the ability to pass one or more parameters using keywords - that you cannot replicate in PHP. In PHP you'd have to assemble an associated array of all the parameters you want to pass to a function, whereas in Python (using kwargs) you just pass the variables already defined. It may sound trivial, but believe me, it's a deal breaker. This is what causes PHP code to look bloated and messy.
I'm not too familiar with Python (started learning) but what you're talking about sounds a bit like named arguments, which PHP introduced in version 8. It does sound trivial though. ;-)
I have to disagree that php is strictly used for web development. CLI PHP is just as powerful as any other CLI, and I often have written my cli scripts with PHP instead of jumping from language to language.
Speed and readability is the advantage you will have with writing your CLI scripts in Python. Try other languages, you'll see it's more efficient and speedier than PHP7 will ever be.
I know this video was posted some years ago but I stumbled across it having used PHP for my web forms. And recently I’ve started moving forward with Python and learned it can be used for web applications. I think I’m catching myself as being one of those like you mentioned who don’t like writing php. Python is more fun and simpler to me. I figure if I can do the same, why not use it right? So I’m just trying to figure what is best for me. I think ultimately I want to use it for email and web forms along with databasing. Blogs and such. Also I think what is drawing me away from PHP is the faulty code that can be written. I think that’s why my contact forms send emails to peoples junk mail folders. Anyways thanks for this information!
Brad. Love your tutorials including this discussion. However, "spaghetti code" comes from Basic and the use of the old "goto" command. Not PHP. Thanks again.
php is awesome and is 3 times faster than phython. 7.3 is now released. PHP 7.3 allows for inlining C code, as well as making heredoc and nowdoc more flexible, among other code readability and flexibility improvements. PHP 7.3 is nearly 10% faster than PHP 7.2, and three times faster than PHP 5.6 - Phoronix, 2018
Great video, but I would like to mention right off the bat that PHP is not strictly used for web development. I have used it in the past as a scripting language as do several people that I have worked with. You can call PHP from the command line and run your script just like you would with Python. It might not be the most popular use of PHP, as say web development, but it is a valid use and an effective one.
Several years ago I moved from Perl to PHP for performance reasons. I spent some time playing with mod_perl etc but PHP was just blazing fast. Will I have performance issues with Python?
A billion and more thanks to you my mentor! Thanks for honest and unbiased opinion. I had seen great tutors but you stand out for me. Keep up the great work Bro, and keep breaking grounds. This is just from a great admirer who have maximum and mad respect for you. Yes, you are just of a kind and a gift to the software development industry. I have always worry about the fact that many of the tutorial online though tremendously helpful but are largely insecure as the tutors pay no attention to security. What is the gain in developing a system that is insecure and the bad Guys come around, they have a field day; creating headaches for you & damning your reputation. For this reason, I have always tried in my programming to give security topmost priority and this had become a habit for me. I advise my fellow developers out to toe same path and spare yourself of the consequences of such negligence. By the way, PHP ROCKS SOLID!!! Thank you Brad for pointing out this fact, Python is only making wave for its other awesome capabilities, so PHP remains the King of the web. Statistics can't be all wrong. I have spoken too much already, I rest my case!
Hey Brad - you mentioned good and bad ways to learn PHP. I checked your course list and it doesn't include a PHP course. As someone who knows no PHP or Python (or much else than HTML/CSS/JS) at all, would you mind pointing me towards the best PHP online course in your opinion please? Thanks for great videos! James
I have seen many code bases, quite large ones, of PHP ocde used for stuff that is not at all web development. A small open source example could be Greyhole which is a diskpooling software that works alongside Samba. That is written in PHP. For myself, when I need to write a small script in Linux and want something I'm more familiar with than shell/bash script I write it in PHP. Works like a charm.
One thing about Wordpress is that its still relying on jQuery and jQuery UI in 2018. Although I have seen examples where people are using wordpress as a headless CMS using its REST APIs and building the entire front end in modern technologies like angular 2+ or react. I thought it was an interesting way of doing wordpress sites.
most of the (hundreds of thousands perhaps) themes available for wp rely heavily on jQuery/bootstrap etc and that might be one of the reasons that it keeps going on with same old tech.. (just my opinion)
Yes thats true...There's so many good plugins available in jQuery that have been worked on for almost a decade. It won't be that easy to get rid of it.
Bad programmers always find a way to write poor code, no matter the language. Also, PHP 7+ is light years away from old PHP versions and a developer in 2018 (using PHP 7+) shouldn't be shunned for it. I heard some companies treated "knowing PHP" as a disadvantage on job interviews, just because they've experienced it years ago and thought it stayed in the limbo of poor practice and spaghetti code.
when i code in php i feel pain and sadness, i think in quiting web developpement twice a day, i really like javascript and it's philosophy, in my country php, c# and java are the most in demand tech , so ..., thanks for your efforts Brad
18:15, that was funny dude. Keep doing some jokes in your videos. Now seriously, you're an awesome developer and instructor too, thank you very much for your work.
That indentation-dependence of Python is the only thing that drives me nuts! Other than that, it’s awesome! Although, nothing matches the joy of Mastering the C language. Its just orgasmic!
I wanted to get into PHP back in 2012 so gave lynda.com a try (PHP with kevin skoglund) and it was horrible horrible but I wasted a lot of my years trying to make living out of it and loosing jobs over it. turn out it was the author who sucked. So I moved to front end dev. looking back those years I wasted I wish u were there at that time. Thank u so much, I recently discovered you and u make under understand so good. Thank you so much! I am gonna jump hardcore into JS and python is 2019. Wish me luck!
Question (not related to this video): Is or will your angular course on udemy (be) updated to v5 (or will be updated to v6, since its release in only a few days)? I'm asking because I watched your video here about ionic, which was a bit tricky since angular v5 had a few changes. Thanks & keep up the great work!
Hey Brad . Thanks for everything you are doing . Every lesson you make , give me a push to learn more and more . I started learning web development . i learned by myself basics of Python HTML CSS JS and im planning to study data structure and algorithms and SQL . But i have problem i dont know how i can put all this stuff together to build websites and how to deal with servers . we will be happy if you can make one video talking about steps to build website and THANKS again for everything
Python is better for everything that PHP isn't good at...which is literally everything besides wordpress. But on a serious note, if you are a freelancer, learn PHP and wordpress, you will get more jobs than any other language.
for web development php is better than python. php frameworks like laravel and symfony are just too good php is also 3 times faster than python. many does not know it, but php is very capable at machine learning. actually php's machine learning libraries equally performed with python's ml. with php having jit, i expect php to surpass python at machine learning. here is a good machine learning library for php rubixml.com/
Dude prefers NodeJs over both and I partially agree but I love Django too. I guess NodeJS is better for applications that requires concurrent processes, like a chat app, or a single page application app. For CMS's I think Django will be better as it gives you structure and the instant admin interface. It doesn't hurt to use both.
I’m not a developer and for that reason I’ve always used Drupal to build my websites. But every single famous startup seems to have used Python. In a world where customer data, including how people interact with our online product, is the key to a businesses success, Can anyone elaborate how/why php builds are/aren’t good at capturing this type of data or why people are using python now? (For context my current project is an online social platform connecting concerned citizens with nonprofits who can address their concerns. So content is important but so is ways to communicate)
I prefer WordPress (PHP) over any other language, You can have a powerful website in hours, instead of months. I used to spend hours, months and years trying to learn PHP until I learn Wordpress (Codex website) that was it. Now I can build almost any website on the face of the earth with the help of Plugin and my own custom plugins, child themes etc.
Can you please do a video on how secure your codes are in laravel? I am new to Laravel and for my demo website I have some passwords written in plain text, in my controller. Its quite convenient for testing certain features but I’m always wondering how secure my codes are in my controllers and how much information I can put there.
I have 9 years in .NET C#, now I'm trying Angular 6 and NodeJS, but to my personal sites I need to choose btw RUBY, Python and PHP. After this video I prefer Python.
I'm a noob in webdev but I've been learning python and can't seem to find an easy tutorial of how to use it for backend such as databases or making user accounts for a web site (forum, newsletter , etc)
Brad have you thought about doing an overview on the latest changes Laravel? There are many different languages that you can compare to one another. Yes I have a firm grasp of C# which is compared to Java. They both share similarities but are way different. Just like PHP vs Python. Like MySQL vs SQLite or MongoDB or mssql
I like PHP because it's doesn't need a framework to connect to a mysql database
I think these days, the days of PHP 7, saying that PHP is bad or ugly is just naive. PHP went to great direction and is now a very mature language. Along with extra tools, namingly linters, you can produce beautiful code with PHP.
I'd like to point out that PHP isn't used strictly for web development. You can also use for pretty much anything python can do given you have the right extensions installed. Take this project for example: github.com/pmmp/PocketMine-MP, it is a Minecraft server written in php (the most popular software available for the pocket edition version). Whilst php is most commonly used for web development you can configure an environment to achieve pretty much anything most other higher level languages can.
PHP is NOT strictly used for web development, many back end processes run PHP code to process database operations that do not require the web.
Heard of any front end processes in PHP?
Web is back end
@@dicejones3654 lmao
AWESOME talk. I am currently learning laravel and I definitely appreciate the people who have put their work into it. ALSO. Please make a docker video. preferably using laravel and vue as the dev env.
man, you are incredible, what ideas, the amount of knowledge, the clarity of the explanation .... I have no say
I find one advantage of PHP over Python is the transportability of knowledge. most general functions in the language family work the same no matter the implementation. substr works the same in C, PHP, JavaScript .... Python brings a whole new syntactic language to bear. If you are generating complex web development, you still have to learn the C structure for JavaScript. I found working with Python and PHP simultaneously rather difficult.
With almost 40 years in programming, your advice is absolutely the best I have heard.
All "C" languages are logical and fast.
Damn!! but there are no one that I can compare with you.
Stephen Grider is close behind.
Mpj from funfunfunction
thx :) will make sure and check him out
Funfunfunctions, whatsdev, mmtuts, mosh, coding train, code school and socratica are also good.
"It's been seven hours and fifteen days..."
I think what really made it hard for php was that you could mix html and PHP into the same file so you pretty much were interweaving business logic with view logic. I think with the rise of frameworks this has helped php developers write cleaner code. Also with php-composer it finally brought a package manager with php.
dude, composer has been around, since, like, 2012
python is better than php
but
php is better than python
i think php is definitely better than python.... but python is definitely better that php.... that is cleat way to say :)
whatever
which language to use? it does not really matter. these languages copy each other. well, mainly php copies everyone else, but still. there's lambda functions in both of them now, generator functions, etc. the main thing i do not like in php is the semicolons that are a requirement at the end of each line ;) otherwise php is clearly based on c (syntaxwise, but there are exact fn names as well from c like printf for instance). What I like in python is that it feels very clearly thought out and designed from the outset. PHP was ahacked together pile of code written in c/c++ in the beginning that worked, but worked as a hack. No clear design goals were laid down just that it should do what the coders could think of they need. Of course it is no coincidence that python3 made some non backwards compat. changes compared to python v2, but it is still much more well designed than just any other language I can think of now (well I don't know too many, just around 10 or so). I think it is more important is what kind of sentiment is behind a language (many people use or not), what kind of problems it is being used to solve, what kind of modules / plugins / frameworks / etc it is being used. Python is much more general, but also there's django, bottle, flask, cherrypy, pyramid, web2py (these are just web frameworks), django-cms, wagtail (cms), odoo (erp), etc. The video is good, I liked it.
Poda loooosu
@@pengekcs I write my sites in assembly
I start my php with Laravel and PSR standard, try invest time to django but concept look awful for me. Php still far neat for me at the moment. Background from C.
PHP is not strictly web. It's a scripting language. I use it often for DB backups in cron processes.
Yeah, I write most of my personal tools and automation scripts in PHP. It's so easy to work with for that sort of thing.
PHP can be very messy for early learners. I just wrapped up a major refactor to clean up some old PHP code. Took 8 repeated files & turned it into an API to handle the differences. Funny part is, the refactor is probably just as difficult to understand as it was before, just because of the mere fact that an API isn’t the easiest thing to work with when written with controllers & models to make it more modular and more easily expandable using more classes or input adjustments. It also added in better security and validation, which further added to the complication. The organization and structure of the code is much cleaner, however, and easier to follow along with - it’s also well documented this time on how it all works and how to expand on it, this is very important!
As for Python, I’ve only worked with shell scripts, which is as close to Python as I’ve gotten. This video had me intrigued to see if python was worth contemplating using for more projects. Not seeing anything i’m working on atm that python would work better for.
"Even if that source is as Awesome as I am"
- This makes me laugh :D
Thanks, bro. I love php. I'm a very recently self-taught 45 year old hobbyist, and just built a simple php gallery for a friend. It took no time to build the site, but got stuck on php mailer. I wasted a week trying to figure out how to get it to work, and no luck. I built my first site, and can't finish because of the contact form. The more I read on line, or watch tutorials, the more confused I am. Seems there should be an easier way to send an email.
oh bro! I almost die while laughing at your comment because I can relate to your ordeal , very painful and frustrating, I must admit. Yours was only a week; mine was a month plus. It got to a point I was almost about crying. As a self taught developer, it was more frustrating cos there was no one to turn to for help. Tutorials could not help directly, stackoverflow too, etc. Until eventually I conquered it but it drained me, honestly, to say the least. Explain your challenge, I might just be able to help out.
Thanks Brad for a great unbiased and informative video. I'm watching this about 4 years after it was uploaded and it still felt like very relevant info.
This video was shockingly balanced and in-depth compared to similar videos I've found. Thanks so much!
If I was half as awesome as Brad at programming, I'd rule the world. Or achieve my dream of a 100k/yr software engineering job.
Just code and build up some useful micro apps :) Style them with PWA idealogy?
Marko Melko Bro, I can barely write an insertion sort algo for my cis103 class. No way am I ready to build a PWA.
PWA is just Javascript promises interfacing other Frameworks to push notifications, cache in resizable formats on mobile...
Ibraheem Kolawole I understood exactly none of that.
Just tried to cheer Antonio to type code more and via that succeed his goals :) Antonio more about concept of PWA from ua-cam.com/video/z2JgN6Ae-Bo/v-deo.html and about AMP ua-cam.com/video/lBTCB7yLs8Y/v-deo.html :) Mainly make better browser based applications to serve people with they needs.
Although PHP is very well known for its use in web app development, that is not the only thing it's used for. PHP actually has a CLI version that has little to do with web app dev and I've seen plenty of professionals use the CLI.
I'm following your videos..& I found you an amazing tutor..but after watching this video ..
I can conclude. Brad you are great human being also.... I mean u are pure soul ..
The syntax begins and ends with a question mark for a reason ;-). I don't mind php though. Php7 is faster than its ancestors.
And with swoole, php is even many times more faster than node js.
Using python for web development is a nitch, and often really isn't directly used to write pages.
Python equally allows for poorly written code, I do not see your point there other then formatting wise which is what most people have a issue with python with.
Keep in mind I use both as well. I find python really really easy, often I use it for prototyping how ever it is really a powerful language.
spaghetti code is a phrase older then php, and it refers to code that is all over the place with no commenting or clear indication of what is going on. It is commonly used to describe newbie coders code with object orientated programing that commonly don't program objects correctly. It can also refer to making code over complicated when there is a simple solution that is better in some way such as optimization.
Python's strick code structure often conflicts with various coding practices that are norms. Such as a prototype description, and line spacing gaps for clear visibility.
Honestly I have used php to do more then just build database driven web apps. I also use it to store general varibles and modify code based off that. Example if I want something censored at a specific time of day, I could use javascript yes, but view that source code and the information is no longer hidden. Mean while I could hide private information behind a password that is in php and isn't in a actual sql db, and no user can see it unless they get remote access to my web server.
PHP is NOT ONLY for websites!! Do not make people wrong. You can use it in other scenarios, for instance as text processing script, ETL, WebServices (I wrote solution to exchage more that 80.000 messages daily)... whatever.
that you can do it, doesn't mean it's the right tool for the job :)
As far as syntax, "curly braces vs indentation" Brad, I can tell you you'll probably like more what you began with. You started out with PHP, so you like that syntax with curly braces. Me on the other hand started out w/Python and had a lot of trouble adapting to the braces. Although I'm writing a lot more Javascript (thanx to you), I still get frustrated with the curly braces at times.
It is not bad to go with more than one language, as example, I started with JavaScript then I learned php, now I'm using both of them based on the project needs.
- JavaScript : VueJS, Angular 2 +, Ionic, NativeScript, ElectronJS and near I will start learning NodeJS/MongoDB
- PHP/MYSQL: WordPress CMS and Laravel
After you learned and created some project with a language you can pick another one to learn and go with it.
I really love you comment. Very simple. Thanks.
where did you learn javascript
From a lot of place, online resource(W3, MDS, Stack Over Flow...) Books(javascript the good parts) UA-cam, Udemy and more...
But, there is really a great tutorial from Brad on Udemy : Modern JavaScript From The Beginning
@@MouradBougarne try also swoole with php. Php is very fast, but with swoole php will be even many times more faster than node js. Also try react php. This is also good for realtime app.
console.log("Even if that source is as awesome as I am") // => Confidence boosted.
I think , as i saw popularity grow in last years , i came to a reason that is highly dependent on open jobs . With python ,i think , application you created with, is corp level application based on popular invest direction . PHP is more entrepreneur based independent workflow . :)
I'm a freelancer, you're spot on about php. I thrive in freelance with php
A side note, PHP was intended for web development, however, there's a less known tool... the php-cli in which it can be used as command line tool much in the same ways as pearl did and I guess... python aswell, not sure how that would go...
many does not know it, but php is very capable at machine learning. actually php's machine learning libraries equally performed with python's ml. with php having jit, i expect php to surpass python at machine learning.
here is a good machine learning library for php
rubixml.com/
I started with .NET C# & Java, but I find those languages too clunky. I like Python and NodeJS (or JavaScript). I'm also looking into Flutter and that looks very interesting.
in what aspect did you find C# & .NET clunky???!!!!
AmirHossein Ahmadi I think he means he does not like the syntax.
@@amirhosseinahmadi3706 I started off with Java 6 & 7, and at that time they were really behind the rest of other languages lacking shortcuts like lambda expression. With C# 4.0, it was getting there but I find that NodeJS with ES6, and another dynamic type language like Python, it was so much easier for me to write code. Now that I'm working with .NET Core, the language is getting very similar and close to that of Javascript & Python; and vice versa with the intro of TypeScript.
Having a preferred language is fair enough but a language is a language, they all have a purpose, learn the ones you need, coders complaining about languages is kinda like mechanics who complain about all French cars "they break all the time! metric and imperial bolts on the same parts! They have no clue!" Yeah that's nice, just fix the car would ye? Same with us coders, just write the code, opinions are like fingers, everyone has them and they always get pointed everywhere. Learn stuff, write stuff, job done really ;-)
"Even if that source is as great as you are". I don't take this as boasting, it's as clear as day that you sure know the industry. I like your logo animation, it's simple but elegant, keep up the quality work.
Dude you nailed this one, I really liked the way you put forward the advantages of both, could you do a Node vs PHP and Node vs Python video too ? I have started backend dev with Node but I don't think anyone is using Node for large scale, more like for small APIs of a big system are based on Node I think, PHP still has so many jobs, I was thinking of learning some PHP and then going full on Laravel and Node
18:27 hell yeah youre awesome braddyyy
I love PHP, I really do.Never understood why people hate it so much. But I agree with you at the end xD "I prefer NodeJS"
I really agree that you are one of the most awesome tutor in the world, taking your laravel course now and learning a lot as in super a lot!!!
Brad - God of the Art of Teaching Code
I love strict type in PHP.
I haven't committed to learning Python even tho I have an obsession with learning different languages because I haven't figured out its purpose other than being a different language to learn. With PHP and Javascript, I know what it is useful for since the first code language I learned was html. I am a webdeveloper and I haven't seen any content yet on how Python is used in web dev. This vid was very helpful because it is clear to me now that Python is probably not a language I will use except if I just wanna have fun learning another language.🙃😉
Words of wisdom. In said context what is your recommendations for someone specializing in Angular looking to start doing side freelance projects but has no back end experience? PHP route (i.e. Wordpress)? Python? Node? What types of projects are popular?
As you mentioned, when doing OOP, both languages are fine. To be fair, Python can get very messy if you take the procedural route. However, Python has what is called kwargs (keyword args) - the ability to pass one or more parameters using keywords - that you cannot replicate in PHP.
In PHP you'd have to assemble an associated array of all the parameters you want to pass to a function, whereas in Python (using kwargs) you just pass the variables already defined. It may sound trivial, but believe me, it's a deal breaker. This is what causes PHP code to look bloated and messy.
I'm not too familiar with Python (started learning) but what you're talking about sounds a bit like named arguments, which PHP introduced in version 8. It does sound trivial though. ;-)
You are talented at teaching, very precise, concise and scientific. Thank you for the fantastic vidz :)
I have to disagree that php is strictly used for web development. CLI PHP is just as powerful as any other CLI, and I often have written my cli scripts with PHP instead of jumping from language to language.
Speed and readability is the advantage you will have with writing your CLI scripts in Python. Try other languages, you'll see it's more efficient and speedier than PHP7 will ever be.
Laravel will show how beautiful PHP can be
I know this video was posted some years ago but I stumbled across it having used PHP for my web forms. And recently I’ve started moving forward with Python and learned it can be used for web applications. I think I’m catching myself as being one of those like you mentioned who don’t like writing php. Python is more fun and simpler to me. I figure if I can do the same, why not use it right? So I’m just trying to figure what is best for me. I think ultimately I want to use it for email and web forms along with databasing. Blogs and such. Also I think what is drawing me away from PHP is the faulty code that can be written. I think that’s why my contact forms send emails to peoples junk mail folders. Anyways thanks for this information!
Brad. Love your tutorials including this discussion. However, "spaghetti code" comes from Basic and the use of the old "goto" command. Not PHP.
Thanks again.
Great overview, THANKS!
You criticize PHP and then state that it's "not relevant today". Older versions of PHP should not be used to knock PHP in 2018.
php is awesome and is 3 times faster than phython. 7.3 is now released. PHP 7.3 allows for inlining C code, as well as making heredoc and nowdoc more flexible, among other code readability and flexibility improvements.
PHP 7.3 is nearly 10% faster than PHP 7.2, and three times faster than PHP 5.6 - Phoronix, 2018
How would you change your overall opinion here - regarding PHP - if this video was in the context of using a framework like Codeigniter?
Great video, but I would like to mention right off the bat that PHP is not strictly used for web development. I have used it in the past as a scripting language as do several people that I have worked with. You can call PHP from the command line and run your script just like you would with Python. It might not be the most popular use of PHP, as say web development, but it is a valid use and an effective one.
True. I have a friend who used PHP for machine learning.
Laravel 5.6 tutorial with new features and best informative video thank u Brad you solved my confusion
want to ask one question , if python is not developed what language would you go on development of web application.
Several years ago I moved from Perl to PHP for performance reasons. I spent some time playing with mod_perl etc but PHP was just blazing fast. Will I have performance issues with Python?
It seems python is slower than PHP because its specification, but it gets the job done in most cases.
A billion and more thanks to you my mentor! Thanks for honest and unbiased opinion. I had seen great tutors but you stand out for me. Keep up the great work Bro, and keep breaking grounds. This is just from a great admirer who have maximum and mad respect for you. Yes, you are just of a kind and a gift to the software development industry. I have always worry about the fact that many of the tutorial online though tremendously helpful but are largely insecure as the tutors pay no attention to security. What is the gain in developing a system that is insecure and the bad Guys come around, they have a field day; creating headaches for you & damning your reputation. For this reason, I have always tried in my programming to give security topmost priority and this had become a habit for me. I advise my fellow developers out to toe same path and spare yourself of the consequences of such negligence. By the way, PHP ROCKS SOLID!!! Thank you Brad for pointing out this fact, Python is only making wave for its other awesome capabilities, so PHP remains the King of the web. Statistics can't be all wrong. I have spoken too much already, I rest my case!
Hey Brad - you mentioned good and bad ways to learn PHP. I checked your course list and it doesn't include a PHP course. As someone who knows no PHP or Python (or much else than HTML/CSS/JS) at all, would you mind pointing me towards the best PHP online course in your opinion please? Thanks for great videos! James
very clear i like php and it was a good bridge between html and programming languages like c c# etc... many thanks
You are awesome, Brad. That made me smile. This was very useful for me, thanks.
I have seen many code bases, quite large ones, of PHP ocde used for stuff that is not at all web development. A small open source example could be Greyhole which is a diskpooling software that works alongside Samba. That is written in PHP. For myself, when I need to write a small script in Linux and want something I'm more familiar with than shell/bash script I write it in PHP. Works like a charm.
Daniel Liljeberg that is interesting. I have never heard of PHP being used for anything other than web development
One thing about Wordpress is that its still relying on jQuery and jQuery UI in 2018. Although I have seen examples where people are using wordpress as a headless CMS using its REST APIs and building the entire front end in modern technologies like angular 2+ or react. I thought it was an interesting way of doing wordpress sites.
most of the (hundreds of thousands perhaps) themes available for wp rely heavily on jQuery/bootstrap etc and that might be one of the reasons that it keeps going on with same old tech.. (just my opinion)
Yes thats true...There's so many good plugins available in jQuery that have been worked on for almost a decade. It won't be that easy to get rid of it.
WordPress code predates php itself. WordPress is an bad example of php code.
Bad programmers always find a way to write poor code, no matter the language. Also, PHP 7+ is light years away from old PHP versions and a developer in 2018 (using PHP 7+) shouldn't be shunned for it. I heard some companies treated "knowing PHP" as a disadvantage on job interviews, just because they've experienced it years ago and thought it stayed in the limbo of poor practice and spaghetti code.
when i code in php i feel pain and sadness, i think in quiting web developpement twice a day, i really like javascript and it's philosophy, in my country php, c# and java are the most in demand tech , so ..., thanks for your efforts Brad
18:15, that was funny dude. Keep doing some jokes in your videos. Now seriously, you're an awesome developer and instructor too, thank you very much for your work.
Great! Thank you so much! May you make a video about django and react? How to combine both :)?
I'll take your advice over anyone else. You're an awesome person. Thank you for all the great content.
That indentation-dependence of Python is the only thing that drives me nuts! Other than that, it’s awesome! Although, nothing matches the joy of Mastering the C language. Its just orgasmic!
I wanted to get into PHP back in 2012 so gave lynda.com a try (PHP with kevin skoglund) and it was horrible horrible but I wasted a lot of my years trying to make living out of it and loosing jobs over it. turn out it was the author who sucked. So I moved to front end dev. looking back those years I wasted I wish u were there at that time. Thank u so much, I recently discovered you and u make under understand so good. Thank you so much! I am gonna jump hardcore into JS and python is 2019. Wish me luck!
I use maybe 25% of PHP for front end dev, 25% for CLI automation job, and 50% for PHP web app...
The term spaghetti code was used originally for Basic.
What will you choose
Question (not related to this video):
Is or will your angular course on udemy (be) updated to v5 (or will be updated to v6, since its release in only a few days)? I'm asking because I watched your video here about ionic, which was a bit tricky since angular v5 had a few changes.
Thanks & keep up the great work!
Hey Brad . Thanks for everything you are doing .
Every lesson you make , give me a push to learn more and more .
I started learning web development . i learned by myself basics of Python HTML CSS JS and im planning to study data structure and algorithms and SQL . But i have problem i dont know how i can put all this stuff together to build websites and how to deal with servers .
we will be happy if you can make one video talking about steps to build website and THANKS again for everything
Python is better for everything that PHP isn't good at...which is literally everything besides wordpress. But on a serious note, if you are a freelancer, learn PHP and wordpress, you will get more jobs than any other language.
for web development php is better than python. php frameworks like laravel and symfony are just too good php is also 3 times faster than python.
many does not know it, but php is very capable at machine learning. actually php's machine learning libraries equally performed with python's ml. with php having jit, i expect php to surpass python at machine learning.
here is a good machine learning library for php
rubixml.com/
I could have not said it any better.
Dude prefers NodeJs over both and I partially agree but I love Django too. I guess NodeJS is better for applications that requires concurrent processes, like a chat app, or a single page application app. For CMS's I think Django will be better as it gives you structure and the instant admin interface. It doesn't hurt to use both.
I’m not a developer and for that reason I’ve always used Drupal to build my websites. But every single famous startup seems to have used Python.
In a world where customer data, including how people interact with our online product, is the key to a businesses success, Can anyone elaborate how/why php builds are/aren’t good at capturing this type of data or why people are using python now?
(For context my current project is an online social platform connecting concerned citizens with nonprofits who can address their concerns. So content is important but so is ways to communicate)
This was really informative. thanks Brad
PHP 7 can now do async tasks and can be used for console application one example is CharlotteDunois/Yasmin library
dude. this will clear it up
good way of presenting- an honest review
Not only am I gonna use ONLY procedural code, but I'm also gonna use GOTO for building all my PHP websites AND they all gonna work just fine.
I prefer WordPress (PHP) over any other language, You can have a powerful website in hours, instead of months. I used to spend hours, months and years trying to learn PHP until I learn Wordpress (Codex website) that was it. Now I can build almost any website on the face of the earth with the help of Plugin and my own custom plugins, child themes etc.
Can you please do a video on how secure your codes are in laravel?
I am new to Laravel and for my demo website I have some passwords written in plain text, in my controller. Its quite convenient for testing certain features but I’m always wondering how secure my codes are in my controllers and how much information I can put there.
Ibrahim Usman you can secure it by adding them to .env file... Read the docs for more info.
Some very interesting points, thanks for your work!
At the end, it's all personal preference. You should always investigate it yourself trying to figure out what language suits you the best.
thumbs up for a unbiased comparison, thanks
could you make an asp.net mvc course? it will be another good option for web developement for those who want PHP or python.
Brad, why was your Web Development Crash Course removed from udemy platform. I was able to take it. So what about it bro?
Can we create desktop applications in Python?
Yes, using tkinter o pyqt
SportyGermanGuy thats ironic, blender uses python but in that link they use php for their wiki 😂 i thought maybe they use django or flask
I have 9 years in .NET C#, now I'm trying Angular 6 and NodeJS, but to my personal sites I need to choose btw RUBY, Python and PHP.
After this video I prefer Python.
Please make videos on BlockChain application platforms ? And how to use them.
"Don't take all your facts from one source, even if that source is as awesome as I am" - Brad Traversy... I totally agree 😁😁😁😁
Congrats sir you reached 700K subscribes.
amazing and informative as always brad!!
I'm a noob in webdev but I've been learning python and can't seem to find an easy tutorial of how to use it for backend such as databases or making user accounts for a web site (forum, newsletter , etc)
if it is a web development scenario, then PHP is definitely better as that is why it was developed
Brad have you thought about doing an overview on the latest changes Laravel? There are many different languages that you can compare to one another. Yes I have a firm grasp of C# which is compared to Java. They both share similarities but are way different. Just like PHP vs Python. Like MySQL vs SQLite or MongoDB or mssql
Traversy you are simply great Bro 😍😘
Python is far from C++ syntax.
Yeah I think python has similar syntax as R
I remember raptor
DOCKER PLEASE
i like this. Id love to see docker too.
I agree!
Js is much like python in terms of versatility right?
I love that statement made at 18:28-29: even if that source is as awesome as i am...you are awesome