PHP 8 Crash Course for Beginners - Learn PHP 8 in 1 Hour

Поділитися
Вставка
  • Опубліковано 28 лип 2024
  • Hi developers! I decided to make a new video where I cover the basics of PHP 8 from scratch in ONE hour. As you, a new developer that wants to learn PHP or are you just looking around to see which programming language suits you the best (Obviously PHP)? Or are you used to PHP and just want a refresher on PHP 8? In this video, we will be covering the basics starting with comments in PHP, variables and data types in PHP, outputting variables and text in the browser, indirect references in PHP, Constants in PHP, all the different operators in PHP, conditional statements and loops in PHP, the ternary operator in PHP, and finally, we will cover functions in PHP.
    Quick note; this video won’t make you a pro in PHP, I will teach you to beginner topics to get started. If you want to have an in-depth course, I recommend my 7-hour PHP course for beginners: • PHP & MySQL Tutorial |...
    🧑🏼💻 Let’s plan a meeting
    Do you need assistance with your next project in Laravel? Contact my Laravel agency for help! www.codewithdary.com
    💌 Newsletter
    Sign up for my free weekly email newsletter: newsletter.codewithdary.com/
    📚 New Udemy Course
    If you're looking to level up your Laravel skills, my new course "Udemy Migirations, Seeders, Factories, Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: www.udemy.com/course/masterin...
    🔥 Resources
    - Instagram: / codewithdary
    - Twitter: / codewithdary
    - Blog: blog.codewithdary.com/
    - TikTok: / codewithdary
    - Patreon: www.patreon.com/user?u=30307830
    - GitHub: github.com/codewithdary
    📋 Table of Content
    00:00 - Introduction
    01:46 - Comments
    03:46 - Variables
    06:32 - Data Types
    13:36 - Outputting to the Browser
    16:24 - Indirect Reference
    17:14 - Constants
    20:04 - Arithmetic Operators
    21:51 - Assignment Operators
    23:09 - Comparison Operators
    27:09 - Logical Operators
    31:33 - Conditional Statements
    36:18 - Switch Statements
    39:10 - Ternary Operator
    41:27 - Foreach Loops
    44:10 - While Loops
    47:00 - For Loop
    48:29 - Functions
    57:11 - Function Scope
    58:57 - Function With Return Statement
    01:00:10 - Outro
    #youtube #php

КОМЕНТАРІ • 35

  • @didzisuzulins2092
    @didzisuzulins2092 Рік тому +11

    PHP dev with 20 years experience here. And I'm looking to refresh and improve my knowledge, that's why I watched your video with critical view - what have I missed or what's new in PHP. At switch..case I literally facepalmed and decided to write this comment. Let's start from beginning.
    1. echoing single and double quotes the difference is in fact that PHP parses content of double quoted string to search variables while single quoted strings are echoed as they are. Years ago people stated that single quotes execute faster. Theoretically yes, but I have never tested it.
    2. It would be great if defining constants you mentioned predefined constants, like PHP_VERSION or magic constants like __FILE__ or __LINE__, just as an example.
    3. Illustrating logical operators at if..else statements, a great example would be plain if(true && true){... and if(true && false){... Sure, real world examples are great, but IMHO for beginners it could be easier to understand what's happening under the hood with plain true && false. 🙂
    4. The best illustration for identical (===) comparison is. If you don't get it, just try to run it.

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

      Thank you for your feedback, definitely taking it into consideration for my next preparations!

  • @kvelez
    @kvelez 5 місяців тому +5

    55:27
    Great trick, wow.

  • @user-mw2bc2ln6y
    @user-mw2bc2ln6y Місяць тому

    Great Video, did the course and didn't crash my first PHP project ur an amazing educator!

  • @jcspaziano
    @jcspaziano Місяць тому

    Thank you! This is just what I needed to get back up to speed with php! Ive been out of the game since 6!!

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

    at 39:53 you say that you check if $username has been set. Though it's not really the case. You're checking if $username is truthy, which means it checks that $username is none of these values: false, ""(empty string), 0.0, 0, "0", [] (empty array), null

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

      Used the wrong wording here! I'm sorry and thank you!

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

    Cool video! nicely edited

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

    Nice video, please make video on advanced topics and OOPs in PHP

  • @hamdikurdi
    @hamdikurdi Рік тому +6

    you are really a great guy I appreciate you but bro we need big projects in php like building systems in php.

    • @codewithdary
      @codewithdary  Рік тому +5

      Yes and once I do that no one watches 😜

  • @moresnacksplease526
    @moresnacksplease526 Місяць тому

    Are the definitions of 'argument' and 'parameter' switched in PHP? I always thought parameters are the data representations used during function construction, and arguments are the data provided during the function call.

  • @olaideabiola2344
    @olaideabiola2344 Рік тому +2

    Thanks for the video, I guess you made a little mistake, parameter is passed at the function definition and arguments are the value passed when function is being called and not the other way round like you said

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

      Whoops, still happens all the time 😓

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

      Yeah it happens sometimes besides I've watched the 7 hours video and it's awesome but I just have tough time with the login system, the multiple nested if statements here are there mskes it so hard for me to take in so please If you can make an authentication system video that will be more simplified. Thanks

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

      I understand, but authentication systems shouldn't be 'simple' though...

  • @jake445
    @jake445 7 місяців тому +1

    Do you prefer functional programming or oop in php?

    • @codewithdary
      @codewithdary  7 місяців тому +1

      OOP any day of the week :)

  • @Marc-zi4vg
    @Marc-zi4vg Місяць тому +1

    _me after watching this video_ **okay where's my lambo?**

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

    plz make Ecommerce Project With React js and Laravel API from scratch plz sir plz

  • @janaramon1232
    @janaramon1232 Рік тому +2

    Php 8 and above have match() instead of switch case ,would have been better if you had included that too.

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

      It's an addition, its not 'stead of'

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

      @@codewithdary ik,i just said it in context with php 8,most people already know switch case exists in lower versions too,here your tuto is about 8 not lower versions,otherwise what would be the point of making video on 8.

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

      I didn't create a video to show the differences between PHP versions, just showing the most used / and must know topics when learning PHP.

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

      @@codewithdary yeah no problem with that ,was just pointing it out!

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

    20:04
    32:50

  • @nathann4291
    @nathann4291 6 місяців тому +1

    There must be a part-2

  • @arkhanzaeni-tl7zv
    @arkhanzaeni-tl7zv 5 місяців тому +1

    Hp gue nge crash

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