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
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.
Thank you for your feedback, definitely taking it into consideration for my next preparations!
55:27
Great trick, wow.
Thank you :)
Great Video, did the course and didn't crash my first PHP project ur an amazing educator!
Thank you! This is just what I needed to get back up to speed with php! Ive been out of the game since 6!!
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
Used the wrong wording here! I'm sorry and thank you!
Cool video! nicely edited
Thanks!
Nice video, please make video on advanced topics and OOPs in PHP
Next up :)
you are really a great guy I appreciate you but bro we need big projects in php like building systems in php.
Yes and once I do that no one watches 😜
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.
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
Whoops, still happens all the time 😓
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
I understand, but authentication systems shouldn't be 'simple' though...
Do you prefer functional programming or oop in php?
OOP any day of the week :)
_me after watching this video_ **okay where's my lambo?**
plz make Ecommerce Project With React js and Laravel API from scratch plz sir plz
Php 8 and above have match() instead of switch case ,would have been better if you had included that too.
It's an addition, its not 'stead of'
@@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.
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.
@@codewithdary yeah no problem with that ,was just pointing it out!
20:04
32:50
There must be a part-2
One day :)
Hp gue nge crash
Thank you I guess :)