Code like a pro in php 2021| Best Practices and code improvements | Updated 2021

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 18

  • @everygamegoing
    @everygamegoing Рік тому +7

    Good vid. I am a PHP developer. I would just say that, regarding the ternary operator (your first example), I don't agree that it "makes the code more readable". Whilst I've got nothing against the ternary operator per se, I think if {} else {} is much more understandable, even if it takes more lines. Also, in most code, after you do the comparison, there's a whole load of things that you want to fire as a result, i.e. if( $i == 1 ) { function1();function2();function3() ... etc }. But yes, you're right, even after 14 years developing, I didn't know some of the things mentioned in this vid!

    • @ZarxBiz
      @ZarxBiz  Рік тому

      Thank you for your brief comment. Glad video helped you

    • @benchmarks1016
      @benchmarks1016 Рік тому

      Php use slowly declining tho

    • @voltbf4379
      @voltbf4379 Рік тому

      ​@@benchmarks1016 Yea.. from 86% of the internet being powered by it down to 81%.. oh my better find new jobs lmao

  • @rijafashions3144
    @rijafashions3144 2 роки тому +2

    sir accept my respect as a one of the best teacher.

    • @ZarxBiz
      @ZarxBiz  2 роки тому

      Thank you 👍

  • @ashokg.j.9174
    @ashokg.j.9174 Рік тому +1

    Thanks, I learnt new things

    • @ZarxBiz
      @ZarxBiz  Рік тому

      Thank you for the comment

  • @sabuein
    @sabuein Рік тому +1

    Thank you.

  • @raadkasem
    @raadkasem 2 роки тому +1

    Great video, Thank you 👍

    • @ZarxBiz
      @ZarxBiz  2 роки тому

      You are welcome

  • @ahmerali1050
    @ahmerali1050 2 роки тому +1

    nice

  • @jerryurena6370
    @jerryurena6370 Рік тому +3

    The best practice would be using PHP only as a backend server not mixed up with UI. The title is misleading by the way.

    • @Alylaxy
      @Alylaxy Рік тому

      Disagree. One of Phps differential is being able to go together with HTML very easily.
      This has the same feeling as: the best practice of python is typing all your variables, letting it be implicit is bad code practice.
      You are right in some cases, but ruling out every possible case is not very wise

  • @musilicks
    @musilicks Рік тому

    gabada GABADA GABADA GABADA GABADA GABADA..... gabada.. gabada.. gaba.

    • @musilicks
      @musilicks Рік тому +1

      sorry. cat got on keyboard. meant to type thanks