Program With Gio
Program With Gio
  • 169
  • 4 648 963
How To Progress In Your Tech Career Through Skills, Networking, and Personal Growth
In this video, we explore five critical areas beyond coding skills that can help your tech career reach the new heights. Dive into insights on Attitude, Networking, Mentorship, Soft Skills, and Effort, and learn how to stand out in the tech industry. Whether you're a seasoned developer or just starting out, these tips will guide you towards a fulfilling and successful tech career.
Subscribe for updates on my upcoming Laravel course: learnlaraveltherightway.com
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon: www.patreon.com/programwithgio
THANK YOU!
🛠️ TOOLS & SERVICES I USE
Digital Ocean Hosting - Get 100$ credit - m.do.co/c/38b935ad74e5
Domains on Namecheap - namecheap.pxf.io/rnRjdQ
Envato Elements - 1.envato.market/c/2937311/298927/4662
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
TABLE OF CONTENTS
00:00 - Intro
01:42 - Attitude
02:42 - Networking
03:11 - Mentorship
04:06 - Soft Skills
05:11 - Effort
06:48 - Outro
Переглядів: 3 208

Відео

Deploy Expennies, Set Up Redis, SMTP, Staging Environment & Connect to Domain
Переглядів 2,1 тис.9 місяців тому
In this video, we learn how to deploy Expennies. In addition to deploying, we will also set up a staging environment, install Redis, SMTP, configure the app & connect both production & staging to actual domains. Get up to 2 Months of Free Hosting by using code "GIO15" and get a $15 free hosting credit. Please use the following URL: platform.cloudways.com/signup?id=1175002&data1=exp&coupon=GIO15...
Are tests really that bad?
Переглядів 2,4 тис.9 місяців тому
Today's video is a thought-provoking discussion about a recent Twitter poll that sparked debate in the tech Twitter (X). Would you choose Types or Tests if you could only pick one? 🔍 What We Discuss: - The importance of Types and Tests in software development - Why Types won in a Twitter poll with ~51% over 12,000 total votes - PHP example that demonstrates the limitations of relying solely on ...
Deploy Expennies To Production Using Laravel Forge - Build Expense Tracker App With PHP 8
Переглядів 3,6 тис.10 місяців тому
In this video, we prepare & deploy our Expennies app to production using Laravel Forge. This is the last video in the "Learn PHP The Right Way" series. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: www.patreon.com/programwithgio THANK YOU! 🛠️ TOO...
Final Exercise - Building Back-End For Dashboard - Build Expense Tracker App With PHP 8
Переглядів 10 тис.11 місяців тому
Final exercise for the series. In this exercise you are expected to build the back-end part for the dashboard page. Front-end is provided for you along with controller & service methods. The exercise has 2 parts bonus: Part 1: Fill in the methods that return hardcoded data & return the real data in the same format Part 2: Seed your transactions table with 100k or even more transaction records &...
Uploading Files to S3 Bucket - Build Expense Tracker App With PHP 8
Переглядів 4,1 тис.11 місяців тому
Continuing our series on building Expennies, this video is aboutadding remote file storage solution. We store uploaded receipts on Digital Ocean Spaces S3 bucket. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: www.patreon.com/programwithgio THANK ...
Implementing Rate Limiting - Build Expense Tracker App With PHP 8
Переглядів 4,7 тис.11 місяців тому
Continuing our series on building Expennies, this video is about rate limiting & how to implememnt it using Redis cache. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: www.patreon.com/programwithgio THANK YOU! 🛠️ TOOLS & SERVICES I USE Digital Oce...
Implementing Caching with Redis - Build Expense Tracker App With PHP 8
Переглядів 9 тис.11 місяців тому
Continuing our series on building Expennies, this tutorial is all about caching. We dive deep into implementing caching using Redis. Caching is like having crucial data at your fingertips, allowing for ultra-fast access and improved performance. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedba...
Implement Forgot Password Functionality - Build Expense Tracker App With PHP 8
Переглядів 3,4 тис.Рік тому
Continuing our series on building Expennies, this tutorial is all about enhancing security. We dive deep into implementing a 'Forgot Password' functionality, a crucial feature for user management in any web app. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become...
Implement Two-Factor Authentication Via Email - Build Expense Tracker App With PHP 8
Переглядів 3,9 тис.Рік тому
In this video, we continue the 2FA logic & implement the verification part to verify the entered code. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: www.patreon.com/programwithgio THANK YOU! 🛠️ TOOLS & SERVICES I USE Digital Ocean Hosting - Get 1...
Send Two-Factor Auth Code Via Email - Build Expense Tracker App With PHP 8
Переглядів 3,8 тис.Рік тому
In this video, we learn how to prepare & send two-factor authentication code via email. SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: www.patreon.com/programwithgio THANK YOU! 🛠️ TOOLS & SERVICES I USE Digital Ocean Hosting - Get 100$ credit - m....
Secure User Verification Using Signed URLs - Build Expense Tracker App With PHP 8
Переглядів 4,1 тис.Рік тому
Secure User Verification Using Signed URLs - Build Expense Tracker App With PHP 8
Set Up Email Verification For New Users - Build Expense Tracker App With PHP 8
Переглядів 3,7 тис.Рік тому
Set Up Email Verification For New Users - Build Expense Tracker App With PHP 8
Implement Authorization Using Doctrine Filters - Build Expense Tracker App With PHP 8
Переглядів 3,4 тис.Рік тому
Implement Authorization Using Doctrine Filters - Build Expense Tracker App With PHP 8
Implement Route Model Binding With Slim - Build Expense Tracker App With PHP 8
Переглядів 4,1 тис.Рік тому
Implement Route Model Binding With Slim - Build Expense Tracker App With PHP 8
Decorating Entity Manager to Avoid Inheritance - Build Expense Tracker App With PHP 8
Переглядів 3,6 тис.Рік тому
Decorating Entity Manager to Avoid Inheritance - Build Expense Tracker App With PHP 8
Exploring GPT-4: AI Breakthroughs Every Developer Should Know About
Переглядів 3,1 тис.Рік тому
Exploring GPT-4: AI Breakthroughs Every Developer Should Know About
Toggle Transaction Review Status - Minor Refactoring - Build Expense Tracker App With PHP 8
Переглядів 2,9 тис.Рік тому
Toggle Transaction Review Status - Minor Refactoring - Build Expense Tracker App With PHP 8
Reduce Memory Consumption & Speed Up Imports - Build Expense Tracker App With PHP 8
Переглядів 4,9 тис.Рік тому
Reduce Memory Consumption & Speed Up Imports - Build Expense Tracker App With PHP 8
Profiling for N+1 Queries - Build Expense Tracker App With PHP 8
Переглядів 4,4 тис.Рік тому
Profiling for N 1 Queries - Build Expense Tracker App With PHP 8
Import Transactions Exercise Solution Overview - Build Expense Tracker App With PHP 8
Переглядів 2,8 тис.Рік тому
Import Transactions Exercise Solution Overview - Build Expense Tracker App With PHP 8
Open Transaction Receipt Files - Build Expense Tracker App With PHP 8
Переглядів 3,2 тис.Рік тому
Open Transaction Receipt Files - Build Expense Tracker App With PHP 8
Avoid These 5 Common Mistakes As A PHP Developer
Переглядів 10 тис.Рік тому
Avoid These 5 Common Mistakes As A PHP Developer
Upload Transaction Receipts With Proper File Validation - Build Expense Tracker App With PHP 8
Переглядів 4,4 тис.Рік тому
Upload Transaction Receipts With Proper File Validation - Build Expense Tracker App With PHP 8
Transactions CRUD Exercise Overview - Build Expense Tracker App With PHP 8
Переглядів 4,2 тис.Рік тому
Transactions CRUD Exercise Overview - Build Expense Tracker App With PHP 8
How To Securely Implement Sorting & Filtering - Build Expense Tracker App With PHP 8
Переглядів 4,5 тис.Рік тому
How To Securely Implement Sorting & Filtering - Build Expense Tracker App With PHP 8
DataTables & Pagination - Build Expense Tracker App With PHP 8
Переглядів 6 тис.Рік тому
DataTables & Pagination - Build Expense Tracker App With PHP 8
Display Errors Using JavaScript & Bootstrap - Build Expense Tracker App With PHP 8
Переглядів 3,4 тис.Рік тому
Display Errors Using JavaScript & Bootstrap - Build Expense Tracker App With PHP 8
Ajax Request Validation - Build Expense Tracker App With PHP 8
Переглядів 3,6 тис.Рік тому
Ajax Request Validation - Build Expense Tracker App With PHP 8
POST Ajax Requests With CSRF Fields - Build Expense Tracker App With PHP 8
Переглядів 4,6 тис.Рік тому
POST Ajax Requests With CSRF Fields - Build Expense Tracker App With PHP 8

КОМЕНТАРІ

  • @ollienicholson
    @ollienicholson День тому

    When I get hired I'm going to send you some cash - invaluable sir!!

  • @YaidierPerez
    @YaidierPerez День тому

    Hey there :) First of all thank you for such great content. As your last example (using the Trait Mail)... would it not be better to use a class Mail with an static method sendEmail instead? Thank you :)

  • @ollienicholson
    @ollienicholson 2 дні тому

    you're the best gio

  • @rashmimore5844
    @rashmimore5844 2 дні тому

    😟I've been trying to set up my project for 4 days, but I'm still not able to get it done.

  • @ollienicholson
    @ollienicholson 2 дні тому

    A lot of cross over with Python which makes my life better. Thanks Gio!

  • @AshrafulKarim-o1s
    @AshrafulKarim-o1s 2 дні тому

    Thank you, your video helped me a lot.

  • @ollienicholson
    @ollienicholson 3 дні тому

    Love it! Thanks GIO!!

  • @obadaalzidi6452
    @obadaalzidi6452 3 дні тому

    Hi Gio, Thanks for this great video ! I would like to use the save() method on parent / child models over using push() on the parent model, because I think that the push() method will loop on every relation on the parent model and then it will loop on every model within the relation and then call the push() method on it ! So it should be much slower right ?

  • @robscaife589
    @robscaife589 3 дні тому

    This is great, I heard about this on Reddit and look forward to filling in the gaps in my knowledge. One suggestion - the complete newbie may not understand what a compiler is. Explaining in layman's terms what the compiler does and what makes compiled or interpreted code better for a given purpose might be useful for completely new users. I look forward to continuing in this course, particularly the OOP sections.

  • @bevedel
    @bevedel 3 дні тому

    really helpful. Thank you.

  • @md.mustakimhayder6402
    @md.mustakimhayder6402 5 днів тому

    Thanks for the video. It was preety amazing. So Composition and Dependency Injection meant to be the same, Am i right!

  • @rashmimore5844
    @rashmimore5844 5 днів тому

    Thanks Gio for the great PHP content! We're really enjoying your videos and content.🙂 I have been facing this issue with a Symfony console command since yesterday. An error was showing: "App\Commands\MyCommand" cannot have an empty name. then I removed these two lines: protected static $defaultName = 'app:my-command'; protected static $defaultDescription = 'My Command'; Instead, I used: use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'app:my-command')] Now my code is running fine.

  • @zeroxm9999
    @zeroxm9999 6 днів тому

    I had to check if something was wrong with the video on the goto part 🤣

  • @benderbg
    @benderbg 6 днів тому

    Video transcript for this lesson if someone needs it: There are different types of errors that can be generated by PHP. We have fatal errors, syntax errors, notices, parse errors, and so on. Some of these errors will stop the script execution, like fatal errors, for example, but some will not like warnings. PHP determines what errors to report based on the error reporting configuration in PHP INI, which we discussed in the last lesson. And you could override that by calling error reporting explicitly within your code at runtime, which allows you to change the reporting level. If you set error reporting to zero, it will turn off the reporting, so no errors will be reported. And if you set it to EO, as mentioned before, it will report all errors, including warnings. You should always use the constants to set the reporting levels, or use the bitmask, which basically combines multiple reporting levels with bitwise operators to form the desired reporting level. For example, if you want to report everything except warnings, you could do EO and not E warning, and now this will report everything except warnings. I recommend using both EO for production and development, as I mentioned in the last lesson, especially for development, because that way you're able to catch bugs early on. Also, as mentioned before, you're able to specify the levels of reporting using the predefined constants. Let's open the list of available error -related constants in PHP docs and review them quick. For example, EError is the fatal error, and it will stop the script execution. We also see the E warning, E notice, E parse, and so on. Let's scroll down a bit, and we see constants like E underscore user, error, E underscore user warning, and so on. And these are like the other E error and E warning constants. The difference is that the ones with the user are generated manually by using the trigger error function, which we'll cover in a minute. We also have the each strict, the deprecated EO, and so on. I will leave the link to this page in the description so you could review them if you want to. So I mentioned that you're able to manually trigger errors. You can do that by calling trigger error function and passing the error message and the error level as arguments. We could also do echo one after, just to show you that this will stop the script execution because we're triggering a fatal error. If we refresh the page, we see that it triggered the fatal error and stopped the script execution because we don't see one being printed. However, if we change to E user warning and refresh, now we see triggered warning, but it did not stop the execution and one is printed on the screen. Quick note here that you can only use E underscore user constants when triggering errors manually. You cannot trigger regular E underscore warning, for example. If you do this, you will get fatal error letting you know that you must use one of the user error constants when triggering errors manually. Alright, let's continue. So when error happens in PHP, PHP will determine if the error has to be displayed or not by using the display errors configuration directive. And we talked about that in the last lesson. You should always have this turned off in production to avoid exposing some sensitive information and internal errors to the user. These errors will be logged for you to review even when you are not displaying them, as long as you have the error login turned on, which we also talked about in the last lesson. The location of error log depends on few factors, but Xampp makes it very easy to access, so you could easily open it by clicking logs and then PHP error log. We'll also talk about how to find error logs on the server itself once we get to that part of the course, which is going to be in the third section of the course. You could also manually log errors by using error log function. You could pass the message as the argument and that will be logged in that file. So how do we handle errors? We haven't talked about how to actually handle these errors. Luckily, PHP allows us to create a customer handler to tell PHP how to handle errors at runtime. This gives you the power to customize it to your needs. Maybe you want to perform some cleanup actions when the error is caught or log it in a certain way and so on. So to register a customer handler, we first need to create the function. Let's call it error handler and this function has to accept at least two arguments. The first argument has to be the error type, which is an integer, and second argument is the error message. It could also then optionally accept the file and the line number where the error happened. Now within this function, we can do whatever we want. You can put if else conditionals or switch statements to handle different types of errors differently and so on. To demonstrate how this works, I will simply print the type message file and line on screen, but you would not want to do that in production or real application because it kind of defeats the purpose of using customer handlers. Because as mentioned before, you don't want to expose your errors to the user, but if you're just going to print it in an error handler, then it doesn't really solve any issues. But I'm just going to do that for the sake of demonstration to show you how it works. You also wouldn't want to display messages unescaped like that. And don't worry about escaping or security for now. We'll talk about that later in the course. You can return false to fall back to standard PHP server handling or return something other than false like true to just continue with the script execution. You might want to do that in certain cases, maybe for certain error types, but you might also want to stop the script execution for fatal or important errors. And you can do that by using the exit statement. So once we have the function ready, now we can register it as the error handler by using the set error handler function, which accepts the customer handler callback function as the first argument and the error level as the second argument. So we could set it to EO to enable customer handling for all errors. And you can customize this to whatever error level you need. Quick note here that this customer handler will override whatever you have set for error reporting configuration setting. So if you had your error reporting set to report everything except warnings, our customer handler would override that because we are now handling all kinds of errors, including the warnings. To demonstrate that, let's comment out the customer handler and let's trigger the warning. Because this variable X has not been defined, it would trigger undefined variable warning, but because of our error reporting, we're not reporting that. If we update the error reporting, now we see the warning. Let's add back the skipping E warning part and uncomment the customer handler and move the X down and refresh the page. Now we see that even though our reporting is set to ignore warnings, the customer handler overrides that because we're specifying to handle all errors, which includes the warnings. Also, as you noticed, our customer handler worked in a printed type message file in line. Be aware that some error types can't be handled like parse and compile errors, for example. So if you have a syntax error here and we refresh page, we will get parse error. And you can see that it's not handled by the customer handler. Also, if the error happens before the script had a chance to execute to the point where it registers the error handler, it will not get handled by the customer handler. And finally, you could always restore the previous error handler by calling the restore error handler function. This is it for this video. We have covered the very basics of error handling and this is just the way to handle errors procedural way. We have not talked about something called exceptions, which are thrown by most errors in PHP and you could throw your own custom exceptions as well. Exceptions are an object oriented way of handling errors and we'll cover exceptions and error handling in more detail in the second section of the course. So thank you so much for watching. If you enjoyed this tutorial, please give this video a thumbs up and let me know in the comments if you have any questions. I'll see you on the next one.

  • @rustamergashev7278
    @rustamergashev7278 6 днів тому

    👍

  • @ollienicholson
    @ollienicholson 6 днів тому

    awesome!

  • @ollienicholson
    @ollienicholson 6 днів тому

    I would donate to this guy if he had a link..oh wait I found his patreon

  • @paulhetherington3854
    @paulhetherington3854 7 днів тому

    /ech pxP''z'' 4''xfrch paavlow fz jcn in mols P''net Wn eml~tmp array loch/ /paavlow [P''vz'' 4 6 8 24 : lk wfrx cannon < Lt up < fos~tmp array tdT(x''OrRxn)]/ /~tmp array f(x)=loch ech fz wfrx cannon II() fos abv : krch Dv(x''frch vd LN'' Wn eml parm)/ /loch () < lk wfrx cannon < Lt up < fos 4''xfrch paavlow P''net parm < fz pxjcn pjx~Wn up Ltz fos < wfrx thrm bwlch mrkd array~parm stapach/

  • @partoffans5849
    @partoffans5849 7 днів тому

    thank u for your efforts

  • @benderbg
    @benderbg 7 днів тому

    This lesson was 10 pages long with 25+ examples!

  • @iftekherhossen7714
    @iftekherhossen7714 8 днів тому

    Thank you

  • @BipsonMukhiya
    @BipsonMukhiya 8 днів тому

    your course have lot of complexity and you are going by your own pace

  • @benderbg
    @benderbg 9 днів тому

    Date is a weird topic in almost all programming languages.

  • @benderbg
    @benderbg 9 днів тому

    The confusing part about working with anonymous functions and callbacks is what part is a parameter and what is an argument. Even official docs keep mixing them up.

  • @learnwithhabib-bd
    @learnwithhabib-bd 10 днів тому

    great tutorial. Are you zend certified developer?

  • @benderbg
    @benderbg 10 днів тому

    If someone needs a transcript for this video here it is: Functions in PHP are similar to functions in other programming languages. It basically is a block of code which can take an input, do some magic and then return a value. There are a lot of built-in functions available and ready to use in PHP but you could also create your own custom functions. You've already seen me create functions and use some of the built-in functions in previous lessons. But in the next few videos, we'll go into more detail on different types of functions, typed parameters, return types, variable scopes, anonymous functions, variable functions, arrow functions and so on. You can create a function by using the function keyword, followed by the name of the function which should start either with an underscore or a letter, followed by the list of parameters that it accepts within the parentheses separated by commas. This is optional so you don't have to define any parameters. And finally, you put your block of code within the curly braces. Let's echo out hello world and refresh the page and we don't see anything on the page. That's because after you declare a function, you need to actually invoke it for you to execute. And by invoking, I mean you need to call that function. We can call it from here, refresh the page and now we see hello world. Instead of printing something directly from the functions, you could actually return something from the function and then do something with that value. So instead of echoing something out, we could do return and now nothing will be printed on the screen, but this actually returns a value. So we could assign it to a variable like this and then echo out x or we can just directly echo it out like this and it will still work. The return statement is optional. So if you don't use it or you don't specify the value to return, then the null value will be returned by default. So for example, if we remove this hello world from here and we var dump full, we refresh, we get null. If we remove the return statement and we refresh, it's still null. So let's change this back to returning something like hello world and refresh. And as you notice, I defined a function on the top before I used it. Now this is not a requirement. You could define the function after like this and it will still work. If you refresh, everything still works. That means that you could define functions at the top or in the middle or at the bottom and they will always be loaded by the PHP first. So they could be used as long as the function has been loaded to the script that calls it. There are a couple of exceptions though. The exception is that if you're defining a function conditionally, then the condition has to happen and pass before you call that function. For example, we could put this function declaration within a condition if false and then do it like that. And of course, this would be some kind of expression, right? Now, if we try to call full, we're going to get an undefined function error. If we set this to true and refresh the page, we'll still get that undefined function error because this has to run first before we try to run the function. So if we remove this and put it down, now everything will work. So just something to keep in mind if you're defining functions conditionally. Another exception is when declaring functions within the functions. Because in PHP, you're able to have functions within the functions. And because functions in PHP have global scope, they can be called from outside of the function as long as the first function was called first. So let me show you what I mean. Let's remove this conditional from here and let's define another function here called bar. And let's echo out bar and let's echo out full here. And we're just going to call full. If we refresh the page, we get full. This function here doesn't get executed because we haven't invoked it yet. If we try to call bar here, now it will work. We'll get full and then bar. However, if we don't call the full first and we try to call bar, we're going to get that undefined function error. That's because the full hasn't running it and therefore this function hasn't been declared. So in order for this to work, you need to call full function first. I would not recommend defining your functions conditionally or defining functions within the functions. It just makes code harder to read. One thing to note is that you cannot have two functions with the same name. So for example, we have full bar and within bar, let's say you had another function called full and we try to call full. Now this will not give you any errors because this is executing this function and it's printing full. If we execute the function bar here, we refresh the page. We're going to get that cannot re-declare the function full. Because now we have a function called full, we call that function which declares function bar and then we call that function bar which declares function called full but we already have a function named full and therefore it's throwing an error. Alright, so next let's talk about the return types. You're able to type in the return value. So what I mean by that is that right now we're returning one, right? But we're not actually telling PHP what the type of this one is. PHP will try to dynamically figure out what the type is and if we refresh the page, we'll get the integer. But we could actually type hint this and the way you can do that is by using colon right after closing parenthesis and then add the expected data type. So in this case, let's do int. So now we're telling PHP that the expected data type of the return value is integer. If we refresh the page, everything still works the same. Now what if we change this to a string one and we refresh the page? It still works, right? We're not getting any errors. And that's because we're not using strict types. Remember a couple lessons before we enabled strict types? Well, right now we haven't enabled the strict types. So basically PHP will still try to figure out the data type on its own when possible. If it cannot figure out the data type, then it will throw an error. So if we change this to something like an array, now this is going to throw an error because array cannot be converted to an integer. Again, if you want to enforce the strict types, it could declare strict types one. And now if we refresh the page, we're going to get an error that the expected type is integer, but the string was returned instead. So we'll need to change it to an integer. So how would you type in something when you're not returning anything? So if you did something like this, what would you type in here? Well, PHP allows you to type hint void and that basically means that nothing is expected to be returned. If we refresh the page, we're going to get null. And that's because, as I mentioned before, when you're not returning anything, the default return will be null. When you're type hinting void and you remove the return statement, it will still work. But it will not work if you try to return null explicitly. If we refresh the page, we're going to get an error. Even though by default it returns null, when you try to return null explicitly, it is no longer void because you're actually trying to return some kind of value. And therefore it will get an error. If you wanted to type in something like integer, but then you expect to have nullable values, meaning that in some cases you might want to return null, but other cases you want to return an integer. Luckily in PHP, there is something called nullable types where you can prefix your type with a question mark. And that indicates that along with the actual type, the null value is also acceptable. This will work because we're returning null, but it will also work when you're returning an integer. If you don't use the question mark and you try to return null, you're going to get an error. Since PHP 8, you could actually type hint multiple types separated by the pipe character. So for example, what if we wanted to return integer or floating number? We could do int, pipe, float, and now we could return either an integer and it will work, or we could return a floating number and it will still work. You could say that you might also expect an array and return an array instead and refresh and it will still work. Now, if you're going to be expecting a lot of different types, then you might not need to type in this many data types. Instead, you could use something called mixed, which is also available since PHP 8. And that basically accepts multiple data types. So you could return an array, it will still work, it can return an integer, it will work, it can return a floating number, and it will still work. I personally don't like using mixed because I like to be explicit on what types I'm expecting. But there are some use cases for mixed, which is why it was introduced in PHP 8. One of those use cases could be that you're expecting a type that can't be type hinted in PHP. Also note that because mixed already includes the null, you cannot mark mixed as a nullable type, meaning that you cannot use question mark with it. Similar to type hinting the return values, you could also type hint to parameters. And we're going to talk about defining parameters, accepting arguments, and more cool stuff in the next video. If you like my tutorials, please give this video a thumbs up, share, and subscribe, and I will see you on the next one.

  • @benderbg
    @benderbg 10 днів тому

    It takes between 1-2h to chew through 8 min of this video. So much info. This video alone is 5.5 A4 pages with all the code samples. Thanks for great content.

  • @MayankJaniOfficial
    @MayankJaniOfficial 10 днів тому

    Hi Gio, big thanks for these PHP tutorials. I have years of experience, but after these videos, I still learnt a lot and now much more confident. Btw do you have any recommendations for similar types of videos for Javascript? I have watched Laracasts but looking for something different.

  • @OmarFedior
    @OmarFedior 11 днів тому

    Using XAMPP and can't get Routing to work? Try to check it out this video: ua-cam.com/video/ytVPiYILz80/v-deo.html Where Program With Gio explains step-by-step how to rewrite server rules.

  • @benderbg
    @benderbg 11 днів тому

    We could learn PHP in 5 sec if every lesson was as important as the GOTO lesson.

  • @benderbg
    @benderbg 11 днів тому

    You killed it with this lesson. So many examples. It would take a couple of books to go through to collect this amount of information on a single topic.

  • @mhballa5866
    @mhballa5866 11 днів тому

    First, thank you very much Gio for the Excellent , Excellent tutorials, I cant talk enough about your ability to teach. would love to see you do tutorials on other programming languages like javascript. Second, I notice in the function getTransactions() you open the file but didn't close it by fclose() in here it does seem to not matter, but in building a production website will this cause error down the road?.

    • @mhballa5866
      @mhballa5866 11 днів тому

      another thing, i notice that in extractTransaction(), when you assign the variable $transactionRow, it did not work, as in : $transactionRow = [$date , $checkNumber ..] only the way you write it : [$date , $checkNumber .. ] = $transactionRow; work why is that?

    • @mhballa5866
      @mhballa5866 11 днів тому

      one last things, sorry ;) the getTransactions() after you add the callable parameter, why do you need the if statement, and why it is null be default? can it be used without the need of extractTransaction() like functions? what other uses for the function getTransaction() without passing callable function? i tried deleting the if statement and the removed the null and it worked. but is this mean there are other functionality that are lost? sorry again, for the multiple questions, but your video is very good for learning and make you think.

    • @mhballa5866
      @mhballa5866 11 днів тому

      really, this time is the last one. do you have ideas for procedural projects like this one. in order to drill the information.

  • @obadaalzidi6452
    @obadaalzidi6452 12 днів тому

    Thanks for the great video Gio ! at 11:07 in the __get() method you can return empty array instead of null in the case of the key doesn't exist and then you can remove the unnecessary ?? when creating the DB instance.

  • @Gwapilevencha
    @Gwapilevencha 14 днів тому

    Mr. Gio, I give you my respect and I say thank you very much for your channel. I have learned a lot and I continue to learn a lot from it. I ask you to continue with that same love. I had studied web development with in University about two years ago, but since four last month until today, I have been learning through this channel. Wow, it is very surprising. I am grateful because I have significantly increased my skills as a Back-end developer in PHP through this course. I am grateful for PHP. Let me dive into PHP as well and add more knowledge. From Tanzania, East Africa

  • @longkesh1971
    @longkesh1971 15 днів тому

    Thank you so much for making these videos.

  • @neozes
    @neozes 15 днів тому

    Truly quadruple A quality content!

  • @bogdanmarian3786
    @bogdanmarian3786 15 днів тому

    Hello Gio, thank you for the great explanation on the cloning of objects topic. What would be a practical scenario where we would implement/use this oop feature?

  • @AlfredoGarcia-mw7os
    @AlfredoGarcia-mw7os 16 днів тому

    This lesson is just amazing, you are awesome!

  • @useful_short_videos
    @useful_short_videos 16 днів тому

    100% useful video!!!! I agree with one of the comments that this video is pure gold. However in the case of my xampp installation on Ubuntu when I repeat all your steps and then try to open 'my-site.local' in the browser, it redirects me to 'my-site.local/dashboard' which is the same as /localhost/dashboard with all that xampp settings. Maybe you know why do I see that?

  • @Stefan-xm9qb
    @Stefan-xm9qb 16 днів тому

    Its dependency inversion, not flow of control inversion. Flow of control stays the same! images.app.goo.gl/4JxEn5DFuxvxeY2x7

  • @longkesh1971
    @longkesh1971 17 днів тому

    Excellent video. These videos are so detailed that all my questions are answered with so many code samples. Thank you so much for taking the time to make these.

  • @EhsanShahbazii
    @EhsanShahbazii 17 днів тому

    Brief, fluent, with the simplest explanations. Thanks ✌🏻🔥

  • @EhsanShahbazii
    @EhsanShahbazii 17 днів тому

    Your channel is a hidden gem. Subscribe 🎉

  • @EhsanShahbazii
    @EhsanShahbazii 17 днів тому

    Thank you for covering the best info in this playlists❤

  • @cathodicprotection4024
    @cathodicprotection4024 17 днів тому

    I have taken several PHP courses on Udemy, but your course is 10 times better. It's structured, detailed, and most importantly, you can explain complex concepts clearly and understandably. Thank you so much, brother!!!

  • @user-zj2bb2pj8u
    @user-zj2bb2pj8u 19 днів тому

    @ProgramWithGio What software do you use to create AWESOME presentation ?

  • @codingSparrow143
    @codingSparrow143 20 днів тому

    @ProgramWithGio Hello !!! Nice explanation, sir👍🏻👍🏻. I have a question: Are predefined and magic constants the same? Or magic constants are just a type of predefined constants? Thanks.😃😃

  • @malikahmadprince287
    @malikahmadprince287 20 днів тому

    why soo fast 😐😶