PHP - Why Coders Hate...

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2018
  • PHP is great for being able to easily create web apps that work. The problem is that it also easy to create code with major vulnerabilities that is a mess to read and try to audit. Many times PHP is used by desktop support technicians to create apps to track department inventory, or work orders that after a few years get coopted by the rest of the company and are being used at a scale never envisioned when the technician was copy/ pasting from a dummies book to make the code work.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 272

  • @elithecomputerguy
    @elithecomputerguy  5 ปีที่แล้ว +12

    Go to www.elithecomputerguy.com to copy/paste code samples

  • @PsychoTaker2305
    @PsychoTaker2305 3 ปีที่แล้ว +98

    I was evading php for years as student. My first job offer was php, I declined I wanted to do backend with python or c#. Guess what, I'm currently interviewing for php position lmao

    • @CloudXIl
      @CloudXIl 3 ปีที่แล้ว +10

      Dude, I’m in the same position, I somehow got brainwashed by everyone hating php so I’m a strong support of everything but no PHP. Well, after all that said, here we are me getting selected in the job interview and now starting in a few weeks as a trainee for a position that uses PHP…

    • @AFuller2020
      @AFuller2020 2 ปีที่แล้ว +7

      @@CloudXIl It's like my Toyota, it's just keeps running. Let the haters use Java and Django on Docker, it will crash.

    • @feminhodiniz
      @feminhodiniz 2 ปีที่แล้ว +1

      I fell sorry dude :/

    • @PlayEthernia
      @PlayEthernia 2 ปีที่แล้ว +4

      It’s a great language. It was a bit rough pre php 4. It’s a really solid language as of 7-8.
      I make over 200k as a php engineer. Check out Laravel. It will be a great framework to keep your code clean and well maintained

    • @kristiyanivanov7414
      @kristiyanivanov7414 2 ปีที่แล้ว

      @@PlayEthernia 200k with how much experience?

  • @delnoth
    @delnoth 2 ปีที่แล้ว +29

    I am currently that "intern" that is learning PHP to slap together an inventory management system for my department. We already have other departments wanting to add their data to ours. I was giggling the whole time relating to the story.

  • @gadget00
    @gadget00 2 ปีที่แล้ว +44

    Every time a magic combo of "easy/productive" programming language comes up and gets pretty popular, all the "professional developers" that take pride in making "good" software "the hard way" belittle it and start a campaign of badmouthing that can last for decades and kill entire tech stacks
    There is a whole history of perpetual developer snobbery: COBOL guys dismissing PL/1, PL/1 dismissing C, C-shell dismissing bash, emacs dismissing vi, vi dismissing nano, dBase dismissing FoxPro, C++ dismissing VB6, Java dismissing C#, Flash/Silverlight dismissing HTML5, CORBA dismissing SOAP, then SOAP dismissing REST, native mobile devs laughing at html5 mobile apps, and so on.
    History doesn't repeat itself, but it rhymes over and over again, as if us developers can't stand to not feel like a "genius", so when an easier approach comes up and gets popular, the first step is to belittle as much as they can to keep feeling special for managing their behemoth of a toolkit that "only us" can understand. PHP has suffered from this for many years, but keeps getting stronger and more popular as well LOL

  • @lemongrapesfilms
    @lemongrapesfilms 3 ปีที่แล้ว +81

    gettype(), get_class(), isset(), is_null()... beautiful consistency 😍

    • @xBZZZZyt
      @xBZZZZyt 3 ปีที่แล้ว +3

      who is naming functions?

    • @kaelon9170
      @kaelon9170 3 ปีที่แล้ว +7

      @@xBZZZZyt Over php's history, contributors to the language did, with each following their own standards rather than php having a predefined naming standard. PHP is probably the most 'evolved' language rather than designed language and things like consistency are a mess due to that.

    • @AFuller2020
      @AFuller2020 2 ปีที่แล้ว

      ​@@kaelon9170 I deploy CRUD admins on Linux VM's all the time, up scale to the main server when ready, best thing ever.

  • @leonardopinzon1320
    @leonardopinzon1320 4 ปีที่แล้ว +18

    You can write horrible code in whatever language of your choice, I mean, that argument at least is not very solid.

    • @dahohi
      @dahohi 3 ปีที่แล้ว

      True, but Python still looks good xD

    • @Shiv-vb1re
      @Shiv-vb1re 2 ปีที่แล้ว +1

      @@dahohi if you know php then it looks great

    • @gurung1812
      @gurung1812 2 ปีที่แล้ว

      That's the thing I get tired of hearing about php

  • @mmh708
    @mmh708 5 ปีที่แล้ว +8

    Thanks for expressing this so well. Definitely my go to video to explain this phenomenon.

  • @StarsiteProgrammers
    @StarsiteProgrammers ปีที่แล้ว +2

    I learned to program about 6 years ago from your unity videos. I still remember how amazing it was to have those first games run. Since then I have learned more than 20 languages and even though I have drifted away from unity and game development, and more into node and backend web dev, game development will always have a special place in my heart. Thank you for making these awesome tutorials years later for new people to try and experience the same thing that I did.

  • @pg1337ful
    @pg1337ful 5 ปีที่แล้ว +52

    Writing php apps using Symfony or Laravel is almost the same as writing Java apps with Spring or C# with Asp.NET .. everyone saying PHP looks bad has never written it using a framework..a REST Api nearly looks identical from design pattern point of view and the corresponding code. And I've written all three for 5-10 years now... so please dear hobby programmers , don't judge what you don't know. This especially refers to the nodejs World, where front end js devs think they know anything about Software Engineering and Development..

    • @xhotweb
      @xhotweb 4 ปีที่แล้ว +7

      Told people don't judge, and then immediately judged other people. Make sense.

    • @pg1337ful
      @pg1337ful 4 ปีที่แล้ว +3

      @@xhotweb don't judge _what you don't know_. I know, reading can be hard sometimes *gg

    • @xhotweb
      @xhotweb 4 ปีที่แล้ว

      pg1337ful That’s exactly what I’m saying. You made a lot of assumptions, which then made your argument fundamentally flawed.

    • @pg1337ful
      @pg1337ful 4 ปีที่แล้ว +1

      @@xhotweb I don't see any assumptions in my text, just experiences.

    • @xhotweb
      @xhotweb 4 ปีที่แล้ว +1

      @@pg1337ful Yes, reading can be hard sometimes.

  • @brucethomas1720
    @brucethomas1720 4 ปีที่แล้ว

    I'm happy to see that you're still around! I used to watch your very first videos in that basement with the train as background noise :-D (When emojis looked like that, too)... I had some doubts with php and remembered you, I'm happy that you found a way to monetise your content and that you're still creating it!

  • @santiagocorrearestrepo6852
    @santiagocorrearestrepo6852 2 ปีที่แล้ว +5

    Hi Eli. My relation with PHP has been as a roller coaster, sometimes I'm glad to work and study it but sometimes the language is not neat and prone to making mistakes in my case. I tried to understand more structured languages to apply similar concepts with PHP and I'm glad to say it has been working. Despite of PHP has been condemned by developers, it is widely required by small or medium-sized corporations and its maturity turn into an important technology that even ranks the most important positions among surveys.

  • @Neodynium.the_permanent_magnet
    @Neodynium.the_permanent_magnet 2 ปีที่แล้ว +9

    The apparent ease of programming in PHP gives the impression that anyone can develop. This is the problem.

    • @RingsOfSolace
      @RingsOfSolace 2 ปีที่แล้ว

      I think literally anyone can develop, though. Especially web development, it's not rocket science.

    • @saketaryan2227
      @saketaryan2227 2 ปีที่แล้ว +3

      and for this same "ease of programming" , people praise python ! messy world lmao

    • @gadget00
      @gadget00 2 ปีที่แล้ว +1

      thats not a problem actually. Its like Rattatouile, "everybody can cook". Well, with the right tool ANYBODY can be a developer. For some ASM was enough in the 50s, and for others they had to wait until COBOL/Lisp/Basic/dBase/foxPro/C/C++/Java/C#/PHP/Silverlight/React Native/Access/MS PowerApps/Bubble.is/etc existed to get in and "be" a developer from then on

  • @emperoroftheearth3215
    @emperoroftheearth3215 3 ปีที่แล้ว +15

    Php is great language for web development ... and love it.

    • @nymez6968
      @nymez6968 3 หลายเดือนก่อน

      Php isn‘t a great language for anything. Literally no matter what you do there are better alternatives.

  • @romany.1322
    @romany.1322 5 ปีที่แล้ว +1

    ELI IS BACK!!! Keep it up man, missed your educational videos so much.

  • @bernardocarvalho2177
    @bernardocarvalho2177 2 ปีที่แล้ว +9

    I'm exactly the guy you spoke about in the video. I am currently moving to a small company to work in a education management system and the guy before me said in my interview that the code base was really messed up and it was easier to write another one from zero using another language than php. However, the CEO agreeded in creating the system with another language after implementing the new feature the system needs, so I'm quite happy
    Edit: if I wrote something wrong, please tell me. English is not my mother language. Thank you

    • @wanjaukevin3212
      @wanjaukevin3212 ปีที่แล้ว +1

      Wait, so which language did you use finally?

  • @neptronix
    @neptronix 2 ปีที่แล้ว +7

    PHP is a valuable language and the low entry point is a massive asset to it! you just need to know what you're doing when you accidentally start a dev shop with it! :)

  • @delturge
    @delturge 4 ปีที่แล้ว +5

    PHP is the beginning of a journey for many people. PHP is fun. PHP is something that is accessible and can be explored. That being said, new PHP developers typically do not see the long term problem with mixing the bulk of their logic with their views. Newer PHP coders tend to not be software engineers. They do not have the benefit of thinking "maintaining code like this will be harder if it's all mixed together." PHP has a results based culture that over time has tried to put more attention on best practices (OOP, PDO, etc ...), but this has not stopped many from making single page, procedural, SQL/HTML/PHP code mixed together, websites (that work!).
    Someone that knows the ropes does not architect their projects like this. Architecture and modeling is what's missing from the results based PHP culture. This has been outsourced to MVCish frameworks.

    • @bookaltd
      @bookaltd 11 หลายเดือนก่อน

      My first PHP project started off with just a few dozen lines then my manager wanted more features on the page. I ended up approaching 1000 lines of mixed PHP, HTML and CSS. Finding anything was a nightmare and it took ages to break it all apart into more manageable parts because I couldn't remember what did what 😂.

  • @turbulentgazelle6276
    @turbulentgazelle6276 5 ปีที่แล้ว +42

    If it's the right tool for the job and you can write code well, then your PHP will be good. If you can't write good code, writing it in Java, Python etc. won't make it any better.

    • @leaper7808
      @leaper7808 4 ปีที่แล้ว +4

      That is not true, PhP syntax alone allows for errors and security holes that are inherent to the language itself. PhP is a vulnerable language by default, that is something exclusive to PhP when compared to other languages.

    • @mrzisme
      @mrzisme 4 ปีที่แล้ว +6

      @@leaper7808 That's not true at all. Especially with version 7.0 onward. Any web-based form app in any language faces the same security holes that makes it up to the developer to cover on their own. No language automatically stops javascript being shoved in the field, or sql injection being shoved into the field, you have to be mindful of all these possibities in all languages and build around that problem. PHP even goes the extra mile to have frameworks like Laravel to automatically snuff those security problems out without any second thought.

    • @humann5682
      @humann5682 3 ปีที่แล้ว +1

      @@leaper7808 I've seen some terrifyingly vulnerable Java and Python in my day. Coders are the security vulnerability most of the time with code, not necessarily the language.

  • @morrismunyu9106
    @morrismunyu9106 5 ปีที่แล้ว +1

    Good work buddy..keep doing the good work🔥🙏

  • @GhazaliGhoussb
    @GhazaliGhoussb 5 ปีที่แล้ว +5

    Hey Eli could you please start a php 7 tutorial from noob to a level where one can create applications such as the ones you talked about in the video. But with clean code adhering to best practices and taking care of the security .

    • @cla1814
      @cla1814 5 ปีที่แล้ว

      My advice is
      start with www.lynda.com/learning-paths/Web/php-developer
      Then search for traversymedia and codecourse.com
      Then laracast.com Leave Laracast for last since is very complex and difficult to keep up, unless you used to PHP and programming.

  • @hasanramadan4791
    @hasanramadan4791 5 ปีที่แล้ว +1

    Good afternoon mr Eli, i just have a question which i really wish u answer it directly if u may , when you talk about a topic in ur videos like now, are u reading ur words out of a board or something?...or its just right from ur head..?

    • @nachomuchacho1640
      @nachomuchacho1640 5 ปีที่แล้ว

      Seems like there is no written script. But in order to keep it short to Eli standards, Eli clearly knows beforehand what he is going to say.

    • @oaxacachaka
      @oaxacachaka 5 ปีที่แล้ว

      What do you think the headset is for? I mean, he’s a smart guy but not some sort of savant. The iq it would take to spout these pearls of wisdom off the cuff would be off the chart and he would be in a cage in the NSA working on decrypting quasar signals of that was the case.

    • @Cognitoman
      @Cognitoman 5 ปีที่แล้ว

      @@oaxacachaka lol wtf. Have you ever watched his live videos ?

  • @khaledkachkorian2486
    @khaledkachkorian2486 5 ปีที่แล้ว +1

    ok, understood. Does using a php framework, reduce writing dirty code?

    • @abdot604
      @abdot604 5 ปีที่แล้ว

      yes very much ,i hated php and even its syntax, but after using laravel it like another thing

    • @mohamedasem6523
      @mohamedasem6523 5 ปีที่แล้ว +1

      @@abdot604 i hated it for the same reason .. will laravel solve this problem!

    • @abdot604
      @abdot604 5 ปีที่แล้ว +1

      @@mohamedasem6523 yeah laravel is clean and easy to understand and it saves you alot of time

  • @Gandoff2000
    @Gandoff2000 5 ปีที่แล้ว +20

    Thank you Eli! I watch a lot of youtube. Your teaching videos make me smarter. Honestly, a lot of youtube videos that I watch make me dumber. Lol

  • @testaccount-ts5nv
    @testaccount-ts5nv 2 ปีที่แล้ว +2

    I love PHP. Writing readable code is a problem caused by the writer of the code, not the language. I can write unreadable code in Python too. Someone shouldnt blame the language for writing bad code. I will use the language for web development as long as it is supported.

    • @denvik
      @denvik ปีที่แล้ว

      dont worry php not going anywhere, all hate and videos are just trying to showoff that its old and time to throw it for no reason.

  • @davidbasil2727
    @davidbasil2727 4 ปีที่แล้ว +7

    Never seen people in real life hating php. Only articles and videos about why people hate php.

    • @gadget00
      @gadget00 2 ปีที่แล้ว +1

      thats so true; I've meet people that do code in other languages and they cherish the 'good ole days' when they could code in PHP. "is like going back to your mother's house; you feel cozy at home again" a friend of mine once said while working on a massive J2EE project back in the early 2010s, how he hated the whole 'java beans counting' nonsense he had to deal with LOL

  • @jdotsystem
    @jdotsystem 4 ปีที่แล้ว +2

    It is one of issues
    You don't know most of service developed without document making in Japan
    And Japanese PHP engineers not sure deference between each php version well
    So it is have to upgrade latest version from older one as PHP5
    PHP is end of contents however fixed the security holes

  • @dibraniuk
    @dibraniuk 5 ปีที่แล้ว +2

    I thought you left youtube for good! I was really considering joining your other website.

  • @flan_02
    @flan_02 2 ปีที่แล้ว +1

    php lover from Argentina. Good Channel eli. Cheers !

  • @TheRoqco
    @TheRoqco 4 ปีที่แล้ว +1

    no mention to Laravel?

  • @xBZZZZyt
    @xBZZZZyt 3 ปีที่แล้ว

    PHP:
    Can't XOR string without lot of appending.
    Can't disable request array making (a[0]=do&a[1]=not).

  • @dennismatsson9995
    @dennismatsson9995 3 ปีที่แล้ว +25

    A lot of the problems you described with PHP are actually fixed thanks to PHP adopting OOP programing and most big applications using the MVC structure.

    • @neptronix
      @neptronix 2 ปีที่แล้ว +2

      Yeah, now we have OOP and MVC problems instead.

  • @brendentorres7319
    @brendentorres7319 3 ปีที่แล้ว +4

    As an intern learning php specifically for going back through code built years ago, I took offense to this hahaha.

  • @coltonwilliams1565
    @coltonwilliams1565 5 ปีที่แล้ว +11

    I appreciate this video. I just started a new job right outta college writing PHP websites. and I love PHP! Seems easy and straightforward like your saying. But I would like to learn more about why people say it’s bad thanks.

    • @samachema4573
      @samachema4573 5 ปีที่แล้ว +8

      THERE IS ABSOLUTELY NOTHING WRONG WITH PHP.
      Bad code can be written in any language. Bad code is what is bad.

    • @coltonwilliams1565
      @coltonwilliams1565 5 ปีที่แล้ว +2

      Enemaku Achema yeah for sure. I can tell php is great. We use the Laravel framework and it makes everything easy. But I’m also open-minded and would like to try using different languages for back end and front end integration to see the advantages of all of them.

    • @Cognitoman
      @Cognitoman 5 ปีที่แล้ว +12

      It’s not really bad anymore...it just people repeating what they hear from old school web devs

    • @AzaLPs
      @AzaLPs 5 ปีที่แล้ว

      @@coltonwilliams1565 If you want to try out other ecosystems, then Python, Go (I personally really like Go), C# (although, people don't really like Microsoft, but there's probably plenty of jobs for it), Node.js, etc. would be good places to look.

    • @AshleyMeah
      @AshleyMeah 5 ปีที่แล้ว +1

      The bad rep comes from LFI, SQL injection and even the blame for XSS and every other type of attack. PHP has made itself more prone to developers who have no idea of security by implementing measures such as with PDO today, you bind values by data type.
      PHP allows access to call shell scripts and stuff too what's useful when it comes to automation like provisioning web hosting to clients, but it's a security risk if you just host a few wordpress installations with badly written wordpress plugins. I don't own your site, I own your whole server.
      It's up to you to configure everything for your scenario. If you are provisioning web hosting or working with clusters, you don't want to be putting rubbish code with your companies critical infrastructure

  • @ci7alex1
    @ci7alex1 5 ปีที่แล้ว +3

    Quite strange that a desktop technician would go as far as coding a PHP database app rather than knocking up an Access file with forms and reports over couple of days. :) That is what we see far too many times... but yes, PHP can be hard to follow if someone else wrote it. However most CMSes now are still in PHP, somehow...

    • @navjotsingh2251
      @navjotsingh2251 4 ปีที่แล้ว

      Yeah, languages like PHP can be written in any style. This is why I prefer languags with strict style guidlines that everyone has to obey, so that you can read their code.

  • @crystall_sh
    @crystall_sh ปีที่แล้ว

    Can anyone suggest me any in depth php free or paid tutorial from udemy or any platform... Recently i went through programming with gio n his videos are ok2 n its hard to grap his teaching

  • @franciswillyfernandez5905
    @franciswillyfernandez5905 ปีที่แล้ว +1

    I love PHP it saves my career as a Web Dev

  • @mr.RAND5584
    @mr.RAND5584 3 ปีที่แล้ว

    Php framework helps?

    • @carterdee7084
      @carterdee7084 3 ปีที่แล้ว

      Yes. Laravel helps a lot. As long a you understand oop

  • @ImaginaryNumb3r
    @ImaginaryNumb3r 4 ปีที่แล้ว +1

    PHP is awesome. As long as you don't need async requests, any sort of paralellism, reasonably high performance, memory leak free programs or want to enjoy higher level constructs (lambda functions, function pointers, stream processing, etc.).

    • @navjotsingh2251
      @navjotsingh2251 4 ปีที่แล้ว

      Where PHP lacks, python succeeds. For example, i use python to manage the async stuff on my site rather than PHP but i use PHP for templating, databases, hashing/encryption etc

    • @mrzisme
      @mrzisme 4 ปีที่แล้ว

      PHP 7.0+ has ternary operators which are basically the same as pythons lambda functions
      For example instead of writing- if condition=true, then value else other value, you can just write $new_value = condition ? $value1 : $value2. =?: quickly separating values. lambda is great, but its mostly used as a shortcut if else statement which php has with ternary operators now. PHP is fully object oriented now.

    • @horart9447
      @horart9447 2 ปีที่แล้ว +1

      @@navjotsingh2251 php is faster lol, and now it's a decent oop language

  • @joydeepbhowmik6181
    @joydeepbhowmik6181 ปีที่แล้ว

    Your are taking about php in 2010 it's has changed and improved a lot ....a whole lot

  • @AFuller2020
    @AFuller2020 2 ปีที่แล้ว

    Ok so you talking about a system that is ugly and works, what is the other option? Wonderfull and expensive?

  • @soulmask2781
    @soulmask2781 3 ปีที่แล้ว +1

    Hey I was a desktop technician and I could code, knew higher mathematics(double integrals, or what about different kinds of infinities?), have a better sense of humor and of course more creative than the vast majority of paid coders out there. But also, I would never have put a huge file with 1000 lines of code, thats like the basics of making your code readable. And then 90% of people dont really follow a "coding standard convention" they just make sure their code is readable, and explain parts with comments while dividing classes into different files etc... ie basic documentation, which ISNT really standardized company to company contrary to what the person in this video implies.

  • @tedv8323
    @tedv8323 ปีที่แล้ว

    Welllllll, for a guy who comes from Perl It was a smart thing to do learning PHP a few years back :)

  • @AzaLPs
    @AzaLPs 5 ปีที่แล้ว +19

    Here's some more food for thought.
    It's not even just the language or the culture of newbies which throw people off, but the core people behind it. The core developers practice a very toxic brand of office politics with people plotting and scheming and trying to twist people's arms to get features in and suppressing features until other factions kowtow to their faction to add what they want or to otherwise compromise.
    Other languages on the other hand tend to be led by skilled professionals who know what people want, never take compromises, and generally speaking, you know exactly what to expect from them.
    With PHP, sometimes you see really high profile people who really worked hard and fought to modernise the language resign in a rage, rant on a blog, and then, eventually return to the language because of how toxic the core community is.
    The toxic people will hold critical features hostage two weeks before feature freeze with the next opportunity to fold those features in without the changes they want being five years away. It's like dealing with the government.

  • @DublinGreen
    @DublinGreen 2 ปีที่แล้ว +4

    How do you blame PHP for the programmer's mistake? For the web PHP is king but my advice is do you, there is space of all programmer and you can always learn another language. 😉

  • @adammontgomery7980
    @adammontgomery7980 5 ปีที่แล้ว +2

    I think it's more about database design. PHP should just serve as an interface to the DB.

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว +2

      @Adam Montgomery design? You can write well designed pattern with php. using laravel or symphony is like using java spring or c# at .net.

  • @tomiikunxd
    @tomiikunxd 2 ปีที่แล้ว +1

    whoop de doo, glad I'm not the only one, just got hired on the spot for a PHP developer position 😭😭

  • @zekeowen1787
    @zekeowen1787 ปีที่แล้ว

    Really value these videos

  • @rohanbangera1623
    @rohanbangera1623 5 ปีที่แล้ว

    I'm having a booting problem whenever my computer shuts automatically....I'm too having a Hard Disk problem...Does cleaning my 1TB HDD will make it a new HDD?...Do I will face this problem again in future

  • @bigollie006
    @bigollie006 5 ปีที่แล้ว +2

    I personally LOVE PHP. All the languages are pretty fun. There are just different learning curves. Its all good stuff if you can take it....bit by bit ;)

  • @ko95
    @ko95 5 ปีที่แล้ว

    okay in php is easy to break conventions, how to learn the convention?

    • @A5tr0101
      @A5tr0101 4 ปีที่แล้ว

      Check out Symfony Framework

  • @oaxacachaka
    @oaxacachaka 5 ปีที่แล้ว +2

    I am far from being an expert but as a tinkerer, I like PHP. It's fairly easy to understand and write all of your own functions... so in that sense you really get to see how websites/apps work. There are also plenty of frameworks for PHP which will aid in understanding things like Django or ROR and also can be used to make secure and nice, readable code. PHP will also make you appreciate Python or Java or whatever language you use "for real" more. If you were given a Mercedes as your first car you might not appreciate it or even come to understand how it works. Better to start off with a beater where you have to replace brake pads and change the oil yourself. PHP builds character, hahaha....but Python is actually pretty great from what I can tell as a non expert.

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      Php is 3 times more faster than Python.

  • @ngreat4390
    @ngreat4390 4 ปีที่แล้ว

    Thanks for explaining why everyone hates php. I'm new to this...but I'm stunned at how much hate php gets

  • @SoundHouseRocks
    @SoundHouseRocks 5 ปีที่แล้ว

    What you said is absolutely true. My PHP programs have such dirty codes. Hope to get better on this matter

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      @John Stuart you can write bad codes with any language. Study design patterns and use php frameworks like laravel or symphony.

    • @navjotsingh2251
      @navjotsingh2251 4 ปีที่แล้ว +1

      Study SOLID and OOP principles. Get in the habbit of writing UML diagrams and flowcharts to explain your algorithms, and nodt importantly comment your code each step of the way.

    • @ipodtouch470
      @ipodtouch470 2 ปีที่แล้ว

      @@navjotsingh2251 to add onto this you should follow up with design patterns

  • @DJ-pn9te
    @DJ-pn9te 2 ปีที่แล้ว +2

    You only described bad programmers, not the language itself. Actually it is one of the most logical languages with oop.
    Keep in mind it is server side as well.
    Python I find is a pure scripting mess with no logical flow.

  • @juicygirls3989
    @juicygirls3989 2 ปีที่แล้ว

    when i was i kid and had no idea about programming, started to play around with php,
    in 10 years, never used it, used python instead for backend and angular/react for frontend

  • @hugoderre3967
    @hugoderre3967 2 ปีที่แล้ว +1

    Old PHP code is disgusting, that's true.
    But today, modern PHP has in my opinion nothing to envy to other object oriented languages since it is itself object oriented and structured, with the arrival of composer project, modern frameworks like Symfony or Laravel in their latest versions, and PHP 8. The readability of the code has nothing to do with that of the time, as long as conventions and good practices are applied.
    But yes, there are still many small and medium-sized companies that continue to use old-fashioned PHP, and this will surely cause the disappointment of future developers who will have to take over this code, I give them all my strength!

  • @mirzasisic
    @mirzasisic 5 ปีที่แล้ว +32

    PHP 7+ is a lot better then the older versions, faster too.

    • @Cognitoman
      @Cognitoman 5 ปีที่แล้ว +1

      Mirza Sisic yea

    • @mmh708
      @mmh708 5 ปีที่แล้ว +3

      Yes, but it's still just as easy to make a mess 😉

    • @aseel1024
      @aseel1024 5 ปีที่แล้ว

      what's the difference of using php 5.3 and 7 ! is they have the same syntax ?

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว +1

      @@aseel1024 no. Php 7 added new syntax and capabilities. It is also faster.

    • @A5tr0101
      @A5tr0101 4 ปีที่แล้ว

      People should look at PHP-DI and using Symfony or Slim 4 with MVC structure and using Symfony Forms and DTO

  • @EagerEggplant
    @EagerEggplant 2 ปีที่แล้ว

    Wait are you the guy Rossman bad mouths?

  • @kelvinotieno4381
    @kelvinotieno4381 3 ปีที่แล้ว

    That's exactly the kind of situation I am trying to deal with right now...been given php code to edit, I can't even right click on a function and go to its definition coz I guess it has been imported from some other file.......Maan really frustrating. But it's a job so just have to figure it out....

    • @nowieszco868
      @nowieszco868 3 ปีที่แล้ว +3

      Get better IDE. Have you tried PHPSTORM?

    • @kelvinotieno4381
      @kelvinotieno4381 3 ปีที่แล้ว +1

      @@nowieszco868 Thanks for the response. I was using vscode but I finally managed to crack it using a few php extensions. I guess I was just frustrated at that time. Thanks........

  • @Me-vc4sf
    @Me-vc4sf 7 หลายเดือนก่อน

    Because of the big community and it's easy to learn... there's so many unprofessional tutorials and inconsistency in function naming...I also don't like how the process starts from Zero for each request....but if you know what's you're doing it's really a ready to go language and honestly looks very organised

  • @eldinmujovic8705
    @eldinmujovic8705 2 ปีที่แล้ว

    At the end, it depends on the situation, but a lot of web is PHP written,...

  • @jasper2virtual
    @jasper2virtual 2 ปีที่แล้ว +1

    PHP is good.
    Chinese has a slang.
    黑貓,白貓,會捉老鼠就是好貓!
    Mean,no matter white cat or black cat, if can catch mouse, it's a good cat!

  • @AdrianDucao
    @AdrianDucao 5 ปีที่แล้ว

    i don't care if you use tabs over spaces or spaces over tabs, the most important thing is that can you code efficiently? and also i don't care if they do OOP or POP the important thing that i ask them is that can you get the job done in time?, i don't care if they use whatever kind of programming languages as long as they can deliver. If i heard them arguing about tabs and spaces war i always say "Talk is cheap show me the code by Linus Torvalds."

  • @gerff01
    @gerff01 5 ปีที่แล้ว +5

    It is a problem with documentation, and commenting your code, not the language.

  • @AshleyMeah
    @AshleyMeah 5 ปีที่แล้ว

    Iv been using PHP for about 10 years, its the way that was popular when i was getting into web development so maybe I am biased. I feel the reason views of PHP can be like this is not because of any reason listed in this video, its not because PHP is easier than c# or any less secure. Its because the WWW dominates the internet, and PHP dominates web servers - its only logical your most used tools will get blunt right? these are the tools of our generation and we just need to teach people how to sharpen their knifes and not accept the clients word; just like you wouldn't write your employees blank cheques for them to fill in their salary

    • @hanes2
      @hanes2 5 ปีที่แล้ว

      I left PHP once Composer was new, it was such a one step forward two step backwards and to this date, PHP still way behind in technologies of what PHP can do.

    • @AzaLPs
      @AzaLPs 5 ปีที่แล้ว

      That's usually what PHP developers say. One of the problems however, is that when you're in the little pocket universe that is PHP, particularly for a ridiculously long time, then it can be very difficult to see all the problems with PHP. After a certain point, all the problems become "normal" and if you never interact with anything else, then you assume that the entire world is like that.
      I almost never run into security issues with other languages. The SQL Injections, the issues with file permissions, the in-built sessions which have problems every now and then, the random number generator which sometimes doesn't work in some versions, the thin layer over C so occasionally someone can slip a null byte through to cause major distress, etc.
      Did you know that can achieve arbitrary code execution with serialize()? Looots of people use that instead of the more secure JSON, as it's in by default.
      With PHP, I have to constantly be paranoid about security about just about any innocent thing.

    • @AshleyMeah
      @AshleyMeah 5 ปีที่แล้ว +2

      ​@@AzaLPs you obviously dont use anything but PHP then. I use c#, assembly a little bit of python and a little bit of c++
      Nothing you said is exact to PHP and can be applied to anything... Tell me one point PHP has thats bad that ASP.net or any other language does not have?
      Again, like iv said, the www is main use of the internet, so of cource its the main target. Its much easier to exploit a web app vs recompiling and rebuilding software.
      Programmers dealing with software also have more experience with the bigger picture. Thats the problem, everyone goes to HTML and PHP to learn. So as you see... people are learning.

  •  4 ปีที่แล้ว

    It functions, unless you're dealing with 3rd-layer imports.
    Import a file in a file that is in a different directory from the file you are executing and your relative code imports start to crumble.

  • @azatecas
    @azatecas 2 ปีที่แล้ว

    i told myself i would never be a php developer when i started learning to code. first job: PHP Developer, didnt have much of a choice since i couldn't get anything else without experience. i had to learn quick and fix so much bad php code i developed health issues from all the stress from deadlines and lack of rest. now work at a different place and hope to never work with it again

    • @erick4454
      @erick4454 ปีที่แล้ว

      These experience as PHP developer helped you to get your second job ?

  • @HilaryOsborne
    @HilaryOsborne 5 ปีที่แล้ว

    As a PHP dev for 10+ years I would say that there would probably be more sense in investing in NodeJS with a flavour of typing such as typescript or flow. PHP is a server side scripting language and really is only useful if you intend on developing ONLY server side rendered apps. Most employers/clients want devs who can do both front end and backend nowadays. At least that is what the job market is indicating. By investing in NodeJS you only have to maintain your skills in one language but have the ability to develop for both front and back end. To all the people who say NodeJS sucks... well good luck to you with that attitude. Just shows your unprofessional side. NodeJS is a lot like PHP in the sense that the technology itself is great but the community, the fan bois and the haters talk up or sling mud making it hard to be objective. This is so, so unfortunate for people just looking to find the right tools for them.

  • @GlennLittleford
    @GlennLittleford 4 ปีที่แล้ว +6

    Having spent years working in Classic ASP, I found PHP the easiest language to move to. Messy code works.

  • @dmitrykim3096
    @dmitrykim3096 2 ปีที่แล้ว

    Maintainability is the most important thing currently

  • @ixxgxx
    @ixxgxx 3 ปีที่แล้ว +2

    Ahh Wordpress must run on c++

  • @smurfisevil
    @smurfisevil 5 ปีที่แล้ว +1

    PHP isn't bad first programming language to learn , it's probably one of the easiest to deploy to web as free and inexpensive hosting is widely available.
    Learn some good design patterns , unit testing for negative and positive testing to catch broken code when refactoring etc ... learning how to use GitHub would also be useful.
    Having said that , if you are looking for a development job , learn JavaScript/TypeScript , There's QA automation job using protractor , back-end using NodeJS , front-end using
    Angularjs/React/Vuejs. If you get into a company writing QA automation , its very easy to find a opportunity to move into development role. I should also suggest learning some NoSQL and SQL.

  • @saumilsunilshah5663
    @saumilsunilshah5663 4 ปีที่แล้ว

    idk why people hate it , it is such a nice language

  • @suzesiviter6083
    @suzesiviter6083 5 ปีที่แล้ว

    The biggest flaw is allowing peeps to create variables on the fly, besides others such as not enforcing strict variable types, programming in php is like hiring a cowboy builder, might get the job done quick but....

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      Suzy Siviter that is open for debate. Some like dynamic langauge and the advantage it can give and some like static language. Php can do type hinting. With php 7.4, it will now have types. Ever heard of laravel.or symphony php frameworks? You can do well designed patterns with php.

    • @ashishkpoudel
      @ashishkpoudel 5 ปีที่แล้ว

      So dont use javascript, because its also loosly typed, same dynamic variables

    • @suzesiviter6083
      @suzesiviter6083 5 ปีที่แล้ว +1

      @@ashishkpoudel Javascript is a little tighter than PHP, least you have to predefine variable types, you try setting a variable to zero in php its also the same as null, that is just bad design, I say all this as a PHP developer though, it is a fast language, where as javascript can look very messy in certain situations like object creation.

    • @suzesiviter6083
      @suzesiviter6083 5 ปีที่แล้ว

      ​@@ojsojs6004 I have, but I havent looked into them yet, but will do so now. Dynamic variable creation is a double edged sword, on one hand its speedy and keeps relevant code together, on the other it can cause lengthed debugging in complex code, I prefer languages a bit 'tighter' but I do come from a C background. Isn't type hinting more down to the text editor than the PHP build?

  • @destrukt4life
    @destrukt4life ปีที่แล้ว

    programing language only seem to matter for coders, a programmer doesn't care about the language because it can be anything as long as it performs and suits the tasks that are required for the specific application or program or even an entire OS

  • @nafisishtiaque
    @nafisishtiaque 2 ปีที่แล้ว

    I can debug JavaScript or c# for hours. But php error gives me headache 😜

  • @CottonInDerTube
    @CottonInDerTube 4 ปีที่แล้ว +1

    "something cooler".
    I dont give a fuck if its cool. It must do the job. I must do the job.
    And if i dont get paid for a low level language then i use high level language.
    You get what you pay for.
    But the example of the growing company was pretty good. But imo that does not depend on the language.
    This can happen in any language.

  • @codefields
    @codefields หลายเดือนก่อน

    Pretty sure people will say exactly the same about Python some years from now. I think the hate of php started by frontend developers and the rise of Node, that brought them the illusion they can do backend without learning anything else.

  • @HSMAdvisor
    @HSMAdvisor 5 ปีที่แล้ว

    Olde time PHP might be ugly as he'll. But since 5.4 and especially 7+ came out it is very very powerful. It has all the same features as NodeJS. AND it runs everywhere!

    • @AzaLPs
      @AzaLPs 5 ปีที่แล้ว +1

      No, no, and no. I recall trying to do WebSockets in PHP around 2013 / 2015 and I winded up having to consult the RFC to roll an implementation of it myself. This isn't helped by the fact that a lot of the lower level byte twiddling functionality doesn't really work properly in PHP, even to this day.
      Also, if you leave a PHP process running too long, e.g. for WebSockets, then you will get a memory leak and things will start to behave really strangely. PHP is designed to be terminated within seconds not days or weeks.
      I would imagine that it probably has real WebSockets libraries by now, but WebSockets is nothing special these days, it's pretty standard, the world has moved on. You need a solution when you have a problem not five years after you stop caring. The new frontier is WebAssembly, etc. and of course, asynchronous programming, although C# had that in 2009.
      C#, Go, Rust and C++ have some degree of support for WebAssembly. I hear it's even possible to run Python.
      More exciting things ahead as the spec matures.
      The ability to reuse server side code in the browser rather than writing it twice is a game changer. Also, you can use these languages for not just websites, but things like games.
      Give it a year or two and you will be referring to 7 as "old time PHP", if PHP jumps on the bandwagon at all.

    • @HSMAdvisor
      @HSMAdvisor 5 ปีที่แล้ว

      @@AzaLPs yeah I know right. I have seen PHP "compilers" that allowed to write UI for windows. Now I see same going on with JS. Sometimes it is ridiculous. And I Work as a hybrid dev. It is all about use case. Dissing ugly PHP just because it can't handle low level stuff it was never designed to do is not useful. Its beauty is what you said it runs for 0.01 sec does its job and dies. Its not PHPs problem someone is trying to use it like a java app. I would love to use JS the way we use PHP, but it is just a different use case imo.

    • @AzaLPs
      @AzaLPs 5 ปีที่แล้ว

      ​@@HSMAdvisor There are strong arguments for asynchronous programming, as it can make programs run significantly faster, but yes, people do feel like every language should do everything.
      I don't know how JavaScript winded up entering every market. I can sort of understand with the server side, as V8 is a very fast and efficient engine, the only other high speed alternatives would be C#, Go and C++.
      PHP can sometimes be slower than Go by a factor of a hundred.
      I don't think JavaScript is too much slower than Go.
      As for things like Electron, I think it's the whole build once and deploy everywhere thing, although I don't get why you wouldn't just open up a browser to use a website. I guess, there's some system API's you can't access via that?
      It's not just them appearing in every market either.
      Every language feels that it has to borrow every feature from every other language too making them nigh unmaintainable for the developers of the compilers / interpreters and forcing people to constantly learn largely redundant things.
      That's one reason I kinda like Go, as they straight-up said. This is the language. This is how it is. Without the constant compromises, features being borrowed from other places, and every bit of code becoming obsolete every year.
      And I said it before, but PHP in the 2000s when it was really taking off was a completely different beast than what they're trying to turn it into now (a clone of C#, more or less).

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      @@AzaLPs for websockets try using reactphp. Try also swoole php for asynchronous. Swoole php blows out node js in terms of speed.

    • @mrzisme
      @mrzisme 4 ปีที่แล้ว

      @@AzaLPs Lol. So your point is that you once tried PHP way back when it was 5.0, before 7.0+ hit and changed everything and had the enormous upgrades, 100% speed boost, security fixes and best frameworks added. You don't get to say "no, no and no" because your information is dated and incorrect.

  • @person771
    @person771 5 ปีที่แล้ว

    U da Man!

  • @RashadPrince
    @RashadPrince 5 ปีที่แล้ว +1

    I've been told the same thing

  • @Quiestre
    @Quiestre ปีที่แล้ว +1

    i really dont appreciate the condescension. "even a secretary can use it" "lower level professionals"
    I do webdesign and this year looked into php because I need it for back end stuff for our website. Barely anyone at my company knows how to use php and I work in an IT company. To on one hand shit on PHP saying it is so easy, yet basically none of our devs use it (they do C# and python for example) but on the other hand say "dumb people like secretaries can use it" is also fucking shitty.

  • @akiw.407
    @akiw.407 5 ปีที่แล้ว

    To be honest, not most coders hate PHP. Usually, those who are not experienced in PHP dislike/hate PHP. So, it becomes a strerotype. On the other hand, experieneced coders/developers may hate PHP due to its performance when compared to NodeJS for fast, real-time web application. In the term of maintainability, and its OOP, PHP has come much more better than what it is used to be.

    • @AzaLPs
      @AzaLPs 5 ปีที่แล้ว

      I dislike PHP precisely because I wrote PHP for ten years. I know it and it's flaws very well.
      And it is slow, although not necessarily in the ways you would expect. A lot of the slowdowns come from it being synchronous and throwing away all the work it did every request rather than the interpreter being slow (which is what people usually think).

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      @@AzaLPs php is not slow. Php 7 is 3 times more faster than python. With swoole, php blows out nodejs at asynchronous speed.

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      Php swoole blows out node js in terms of speed at realtime applications.

    • @maxosall6972
      @maxosall6972 4 ปีที่แล้ว

      PHP was my first choice but just hated its syntax, so switched to ASP.NET

  • @CharlesSmith-vk8co
    @CharlesSmith-vk8co 3 ปีที่แล้ว

    And Python is hard?

  • @CViniciusSDias
    @CViniciusSDias 4 ปีที่แล้ว

    Why don't you never give real life examples. You say: it's very easy to write unsafe code with php.
    Which unsafe code is easy to write in php but not in other languages?

    • @aristidisbarlos6391
      @aristidisbarlos6391 3 ปีที่แล้ว

      Reputation is everything.Unfortunately PHP has a bad rep although it is safe imo as any other language anymore.

  • @user-jk8kn3ij8o
    @user-jk8kn3ij8o 8 วันที่ผ่านมา +1

    PHP is cool.

  • @AshleyMeah
    @AshleyMeah 5 ปีที่แล้ว +6

    I feel PHP will be the primary way forward for the current WWW as we know it for some time, and Id personally recommend PHP as a starting point, With some experience in the field you will learn to adapt to new languages quite easily, most job listings seem to be for PHP or ASP.NET

    • @remoarnoldchestera.2382
      @remoarnoldchestera.2382 5 ปีที่แล้ว

      Ahm hello I'm just learning PHP few Months ago but I find it difficult coz I don't have any experience about coding I have basic undertanding of html and css then I move up to php, Can you give me an advice to improve my learning? Btw I don't have money to enroll my self in online courses so I find it difficult. Thanks in advance! :)

  • @obamascock2169
    @obamascock2169 3 ปีที่แล้ว

    I feel like people who talk shit about php still are thinking its like php 5 and thing you still use mysql_real_escape for every user input. But its nothing like that nowadays and its a lot cleaner to read using pdo and prepared statements, and oop.

  • @armincal9834
    @armincal9834 5 ปีที่แล้ว +6

    i don't think there is a better programming language for web development than PHP, i mean Javascript is being used for backend these days but it doesen't have all the neat built-in functions that PHP has, like communicating with the DB or creating/openning files so if your goal is to JUST learn web development i think u have to know both javascript and php but if you want to be a programmer in general who builds software for different operating systems then by all means learn Python or c#. at the momment i want to get a job as a web developer so im just learning PHP and Javascript(i'm more focused on backend) and i don't need to learn an entire language like python which is way more complicated than PHP or JS, JUST to build websites using Django which has a very different syntax by the way.

    • @cla1814
      @cla1814 5 ปีที่แล้ว +1

      Actually PHP is more complex than Python. Python is a lot simpler and easier to read that is why many newbies prefer it.
      My advice is move to laravel as soon as possible and learn vue.js as well. You can learn at laracast.com

  • @novailoveyou
    @novailoveyou 3 ปีที่แล้ว

    Exactly!

  • @hanes2
    @hanes2 5 ปีที่แล้ว

    I bet some intern who made the original PSN. I'm pretty sure about it LOL

  • @rogernevez5187
    @rogernevez5187 5 ปีที่แล้ว +1

    Is there a clear+concrete example showing why PHP can become a mess while others don't ?????

  • @kiezelsteen92
    @kiezelsteen92 ปีที่แล้ว

    You can write bad and ugly code in every language. Just go to stack overflow. You´ll find some ugly snippets in every language (incl python, java, javascript, c#). All these languages are seen as ´the best´. Php is evolving and php 8 has many good options to give you the possibility to write cleaner, less error prone code. The idea that php is ´bad´ comes from the pre php-7 times. And the haters... probably never tried to program php in a decent way.

  • @nachosniegenserio
    @nachosniegenserio 4 ปีที่แล้ว +1

    You don't hate php code, you hate php coders.

  • @aryeahzenter4378
    @aryeahzenter4378 5 ปีที่แล้ว +2

    Coding PHP on a Mac? Basic.

    • @taylorsmith9629
      @taylorsmith9629 3 ปีที่แล้ว

      You have to start somewhere

    • @AFuller2020
      @AFuller2020 2 ปีที่แล้ว

      I set up a simple LAMP stack on a VMware module with a !0 GB image, I port these out all day on a free VMplayer, add some CRUD and bootstrap, people love it. An yes I use a Mac, and yes all of the software is open source.

  • @maxosall6972
    @maxosall6972 4 ปีที่แล้ว

    Count me in

  • @mrzisme
    @mrzisme 4 ปีที่แล้ว +2

    So if I got this right, if you have a non-coder make a mess of PHP code, it may become a problem way down the line? That's true of every programming language ever created. The truth of PHP is, it gets the job done. Version 7.0+ has all the security features and is much faster than Java at run time and Python thanks to be anchored in C, and lets be honest, to the people saying PHP is old and you should use python or Java... Python, Java and PHP were all created in the early 90's, yes each of them, there's no old grandpa in this mix, only incorrect assumptions and incorrect perceptions. If you want to build web apps, python is a major pain in the ass to get going. The amount of effort it takes to setup the web server for python and the amount of effort it takes to learn django on top of python is so much greater than simply using php for the job in any web app. 80% of all websites that use server-side code are PHP. Some of that is because wordpress is such a ridiculous market presence but a lot of that marketshare is because PHP was made for this purpose. It goes hand in hand with HTML and doesn't require a bunch of third party bullshit to get up and running. It's a core tech.

  • @omniversal4739
    @omniversal4739 4 ปีที่แล้ว +2

    It's just as easy to learn as Javascript.

  • @stef1896
    @stef1896 5 ปีที่แล้ว +3

    Generation X IT folks should stop talking about PHP 3 once and for all. That's a history for god sake! If someone don't know OO programming, PDO, etc. he/she is NOT PHP developer! PHP is still the King when it comes to back-end programming and PHP 7+ is stable, secure, reliable and, by the way, faster than Python. Generation X ignorants and hipsters on Node.js and Python hype should start listen reasonable people and stop whining about how PHP is bad. It's not and it doesn't going anywhere! Laravel (just one of many prominent PHP frameworks) is taking over Django and Express.js (the main competitors of Python and Node on server side), while Ruby on Rails is sinking slowly but surely. Should you learn PHP first? I don't see why you should learn anything else before PHP for server side purposes.

    • @ojsojs6004
      @ojsojs6004 5 ปีที่แล้ว

      Well said. I don't see any reason to use nodejs over php 7. In terms of asynchronous speed, php swoole is faster than nodejs. Reactphp is also good for realtime apps. In tes of design pattern, php 7 is better than nodejs.

  • @science_trip
    @science_trip 3 ปีที่แล้ว

    There are som many mistakes!!!! The people that they are juging languges like: you are not writing clean code there etc are people that they are not able to write applications with vanilla code, but only with frameworks. The only programming language that forcing you to write a stractural code is Pascal!!! I found shity code in PHP, in Java, in Javascript, In C, in C++, in Visul Basic, in C#, in Python etc. the problem is not the the languages! the problem is the people that they didn't learn the programming basics (algoryms, data stractures and design patterns). If you know how to write a good code, you can write it also in PHP and you can have a clean code too. Laravel, Django, Express.js all thease are frameworks not the language.