Hi everyone! It has been a while since the last upload. I have had my office under maintenance, and I have had technical issues with my PC and the equipment I use to record videos, which is the reason why it took so long. I'm still having technical issues but I'm hoping that I'll manage recording until I get it fixed.
I have to say it Daniel, it has been few years since the last time I was into progamming, and I just wanted to refresh my knowledge. Your content is so specific and entertaining that I've watched 10 episodes today while practicing. Great work, and thank you for sharing you're knowledge with us.
Thank you so much! I have watched all the OOP PHP tuts of yours, but you never mentioned or promote some of your products (if you have any). If you dont have products, create some udemy courses or something (some way people can support you). Use the platform to your advantage still give free info like this but also promote your business. You are a very nice guy, keep it up!
He had mention before that he doesn't want to put his content on Udemy because he wants everyone access his content for free. You can support him by donate on patreon 😉
Great course, thank you, I've been programming for years but always worked procedurally (!) which has really held me back in the modern world. As a 'C' programmer though not declaring types has always made me a bit uneasy when working with PHP - at last, the mystery resolved! Thanks mate :)
Thank you so much Dani.. I really enjoy your teaching... I was at the verge of giving up on coding when I came across some of your tutorials, and ever since then I have been coding again and now I have fallen in love with it. Thank you so much man.
It's great to have you back. Pls, if you won't mind making a video on like and unlike button to an article page also a hit counter which count the number of visits or views to the article page. Thanks so much in advance.
your videos are great! please ever make a video on visitors count in website using cookies. Thanks for your awesome videos and for your teaching . keep up the good work.....
That is a great thing, but i think that it doesn't matter what type is user giving because anything that is typed in forms is going to be string, and that is the only way that we let user communicate with our app, but anyway i didn't know about this and it's great that php is going in that direction
Type Declarations isn't as much meant to catch errors the user generates through primitive data types, it is more meant for the developer. In our case here in this course, for when we start working with instances of other classes or the same class. However either way, it is seen as best practice to use Type Declaration whether or not you are working with primitive data types or not.
Hi, you probably know what is magic method. Do you use it in your projects or you recommend more to you use regular syntax for getters and setter as in you example? P.s just a thought: you can add int, string, array and other Type Declarations into parameters, for example: public int $name ; it would be faster and easier to find. unless you will need every time to call setters to change data type. But I am not sure how often it would be needed.
Hi Dani, I should really appretiate your effort and Still on 2022 someone is out there learning oop php from your video. Thank you so much for that. however, around time 3:30 yo say by double quote we can assign integer as string which actually happened in my code that i copied yours, where if i pass setname(2) without the double quote there is an error message but when i setName("2") then there is no error, but around 3:40 you said this has to be an error message. but no error was shown even though i have declared the strict type 1 in my index file. Your help and answer would be much appretiated thank you.
@@Dani_Krossing I am very sorry, my bad, it's all the way around. I am running PHP 5.6 and prior to PHP 7 type hinting can only be used to force the types of objects and arrays. In my case the error that I get is "Argument 1 passed to Person::__construct() must be an instance of string, string given, called in". sorry
I am new to coding. And honestly saying I have watched many videos to understand OOP but couldn't figure it out. I am badly waiting for your videos but it seems like you have a technical issue. I am expecting some practice videos on OOP afterwards.
I like your teaching style. However, one issue I've found is that the course as it's set up now is not using consistent files, which is making this difficult to follow. This particular lesson is throwing an error because too few arguments are being passed. I believe this is because the __construct method was deleted at some point, but this isn't shown. You also didn't include the name space from the previous lesson. Some of this is pretty easy to figure out, but having to figure out errors unrelated to the lessons distracts from learning the concept of the course. Especially when you introduce a concept - such as name space and constructor - and then don't use it in subsequent videos.
Hi Daniel, I have made a registration form using your tutorials and was wondering if there is a way to get and show errors on the form without using the URL and GET method.
I start to use type declarations in my functions but just for int, string and array without strict_type = 1, I use these just to help the future developer to know how type of dato should go there... is a correct way to do that?
That is ok, it is also very useful for your IDE, as it will know as well what type is expected, so it can show you error message (type missmatch) even before you run your code.
But what if you were to pass in the digit "2" as parameter with strict mode set to 1? Wouldn't it take that 2 as string too and spit out 2 on the browser as output too?? When you explained it before altering the code to practicality you mentioned one can't even pass the digit as string if it's wrapped in double quotes with strict mode enabled or strict mode set to 1(true)!
Hallo, can you make a video about how to scale Ifram to work width the content? I am using that for some of my client`s website for embedding booking website for courses?
declare(strict_type = 1) must be first line of code, aswell as session_start() What if I have to use both and the same time ? Btw why wouldn't I go for **if(is_string($var)) {//code here}**
strict_type can go above the session_start, but they do not interfeer so it doesn't actually matter. you can check on string manually, and probably should. Declaring types helps future developer understanding what type should be passed to the method/function, and a good IDE can warn you even before you run your code that there is some type missmatch
I have some problem bro.i have mssql database date .i wrote the program to received the data in to the html table.now i want to get the table data and store in the mysql data table .how do i solved the question??
Using Strict Types What Type Would this __Construct Function be: function __construct( $db=NULL, $cookie_prefix = 'usr' . ':' . 'hash-cookie' .bin2hex(16), $table_wildcard = '%t' ) Would it be a String, Has numbers in it aswell...
Hello, I want to know, is it possible to give type hinting to roles and permissions separately? public function getRoles(): array { if (Gate::allows('role_access')) { $roles = Role::with('permissions')->orderBy('id', 'DESC')->get(); $permissions = Permission::all(); return [ 'roles' => $roles, 'permissions' => $permissions ]; } }
Dear Mr denial Hi iam an amateur in web development i have an issue hope that you can help me with --- i cant understand tutorial that about .htaccess the way you redirect all requests to index.php then use $_SERVER['REQUEST_URI'] can you please do that tutorial for us really appreciate your effort and thanks in advance
Hi, I haven't deleted the videos. I just removed them from the playlist since the order of the videos didn't make sense anymore. Newer videos are planned for the future, however if you want to see the old ones I removed, you can find them on my channel.
Hi everyone!
It has been a while since the last upload. I have had my office under maintenance, and I have had technical issues with my PC and the equipment I use to record videos, which is the reason why it took so long. I'm still having technical issues but I'm hoping that I'll manage recording until I get it fixed.
bro nice teaching skills you doing great job man.
i know it's kinda randomly asking but do anyone know of a good place to stream newly released movies online?
I have to say it Daniel, it has been few years since the last time I was into progamming, and I just wanted to refresh my knowledge. Your content is so specific and entertaining that I've watched 10 episodes today while practicing. Great work, and thank you for sharing you're knowledge with us.
Finally Learn Half OOP PHP in Just Few Hours! Thanks Daniel for Such Awesome Tutorials!! Better Than What Teacher Teaches!!
Thank you so much!
I have watched all the OOP PHP tuts of yours, but you never mentioned or promote some of your products (if you have any).
If you dont have products, create some udemy courses or something (some way people can support you).
Use the platform to your advantage still give free info like this but also promote your business.
You are a very nice guy, keep it up!
He had mention before that he doesn't want to put his content on Udemy because he wants everyone access his content for free. You can support him by donate on patreon 😉
Strict typing is always a good thing to do in coding. It helps avoid unpredictable results and debugging headaches.
Great course, thank you, I've been programming for years but always worked procedurally (!) which has really held me back in the modern world. As a 'C' programmer though not declaring types has always made me a bit uneasy when working with PHP - at last, the mystery resolved! Thanks mate :)
Following your tutorial since 2018
Thank you so much Dani.. I really enjoy your teaching... I was at the verge of giving up on coding when I came across some of your tutorials, and ever since then I have been coding again and now I have fallen in love with it.
Thank you so much man.
You're an incredibly awesome tutor! Thank you very much! You just taught me PHP.
That's great, php 7 changed the game , this was great lesson and opened my mind for other opportunities for my codes.
thank you so much. you explained it clearly.
This guy is the best i tell you...
It's great to have you back.
Pls, if you won't mind making a video on like and unlike button to an article page also a hit counter which count the number of visits or views to the article page. Thanks so much in advance.
Want a project with OOP PHP.Keep up the good work
you are incredibly awesome tutor
thanks so much
I really needed it
your videos are great! please ever make a video on visitors count in website using cookies. Thanks for your awesome videos and for your teaching . keep up the good work.....
The best like always, top man! Thanks
amazing sir keep it .
We are waiting for your more tut
thank you sir
this part of video was nice
Nice video! Maybe you could also say something about defining return types for methods.
You are good sir, upload your tutorials on UDEMY to make more cashflow.
thank you
That is a great thing, but i think that it doesn't matter what type is user giving because anything that is typed in forms is going to be string, and that is the only way that we let user communicate with our app, but anyway i didn't know about this and it's great that php is going in that direction
Type Declarations isn't as much meant to catch errors the user generates through primitive data types, it is more meant for the developer. In our case here in this course, for when we start working with instances of other classes or the same class. However either way, it is seen as best practice to use Type Declaration whether or not you are working with primitive data types or not.
Thank you so much!
Thank u very much for this cool course. I have a question, Is enabling restrict mode may cause some security problems?
Hi, you probably know what is magic method. Do you use it in your projects or you recommend more to you use regular syntax for getters and setter as in you example?
P.s just a thought: you can add int, string, array and other Type Declarations into parameters, for example:
public int $name ;
it would be faster and easier to find. unless you will need every time to call setters to change data type. But I am not sure how often it would be needed.
Hahaha cracking with the patches on the video , so funny
Hi, do you have a CRUD tutorial for OOP PHP?
up
Hi Dani,
I should really appretiate your effort and Still on 2022 someone is out there learning oop php from your video.
Thank you so much for that. however, around time 3:30 yo say by double quote we can assign integer as string which actually happened in my code that i copied yours, where if i pass setname(2) without the double quote there is an error message but when i setName("2") then there is no error, but around 3:40 you said this has to be an error message. but no error was shown even though i have declared the strict type 1 in my index file.
Your help and answer would be much appretiated
thank you.
ty
Awesome
What PHP version are you using? the type declaration is not allowed anymore in php7, can only be used to force the types of objects and arrays
If you go to the official PHP.net documentation, it doesn’t say type declaration isn’t allowed anymore. Can you provide evidence of this claim?
@@Dani_Krossing I am very sorry, my bad, it's all the way around.
I am running PHP 5.6 and prior to PHP 7 type hinting can only be used to force the types of objects and arrays. In my case the error that I get is "Argument 1 passed to Person::__construct() must be an instance of string, string given, called in".
sorry
Just glad it got cleared up :)
I am new to coding. And honestly saying I have watched many videos to understand OOP but couldn't figure it out. I am badly waiting for your videos but it seems like you have a technical issue. I am expecting some practice videos on OOP afterwards.
I like your teaching style. However, one issue I've found is that the course as it's set up now is not using consistent files, which is making this difficult to follow. This particular lesson is throwing an error because too few arguments are being passed. I believe this is because the __construct method was deleted at some point, but this isn't shown. You also didn't include the name space from the previous lesson.
Some of this is pretty easy to figure out, but having to figure out errors unrelated to the lessons distracts from learning the concept of the course. Especially when you introduce a concept - such as name space and constructor - and then don't use it in subsequent videos.
Hi mm,
but this works just if you declare type inside the parentheses?
Hi Daniel,
I have made a registration form using your tutorials and was wondering if there is a way to get and show errors on the form without using the URL and GET method.
I found a way to do this using $_SESSION
Will u do unity tutorials?
I start to use type declarations in my functions but just for int, string and array without strict_type = 1, I use these just to help the future developer to know how type of dato should go there... is a correct way to do that?
That is ok, it is also very useful for your IDE, as it will know as well what type is expected, so it can show you error message (type missmatch) even before you run your code.
But what if you were to pass in the digit "2" as parameter with strict mode set to 1? Wouldn't it take that 2 as string too and spit out 2 on the browser as output too?? When you explained it before altering the code to practicality you mentioned one can't even pass the digit as string if it's wrapped in double quotes with strict mode enabled or strict mode set to 1(true)!
Hallo, can you make a video about how to scale Ifram to work width the content? I am using that for some of my client`s website for embedding booking website for courses?
declare(strict_type = 1) must be first line of code, aswell as session_start()
What if I have to use both and the same time ?
Btw why wouldn't I go for **if(is_string($var)) {//code here}**
strict_type can go above the session_start, but they do not interfeer so it doesn't actually matter.
you can check on string manually, and probably should. Declaring types helps future developer understanding what type should be passed to the method/function, and a good IDE can warn you even before you run your code that there is some type missmatch
❤
Great tutorial. However I was not able to get any errors on my browser and I had to use
ini_set('display_errors', '1');
error_reporting(E_ALL);
I have some problem bro.i have mssql database date .i wrote the program to received the data in to the html table.now i want to get the table data and store in the mysql data table .how do i solved the question??
What editor do you use?
Looks like Atom (atom.io/)
Kakarott Milan Atom
Using Strict Types What Type Would this __Construct Function be:
function __construct( $db=NULL, $cookie_prefix = 'usr' . ':' . 'hash-cookie' .bin2hex(16), $table_wildcard = '%t' )
Would it be a String, Has numbers in it aswell...
Hello, I want to know, is it possible to give type hinting to roles and permissions separately?
public function getRoles(): array
{
if (Gate::allows('role_access')) {
$roles = Role::with('permissions')->orderBy('id', 'DESC')->get();
$permissions = Permission::all();
return [
'roles' => $roles,
'permissions' => $permissions
];
}
}
Dear Mr denial Hi iam an amateur in web development i have an issue hope that you can help me with
--- i cant understand tutorial that about .htaccess the way you redirect all requests to index.php then use $_SERVER['REQUEST_URI'] can you please do that tutorial for us really appreciate your effort and thanks in advance
while I trying this tutorial. I get an error message that " Fatal error: Class 'Dbh' not found "
Have you followed previous tutorial ?
Make sure you gave the right path of the class.
declare("strict_types = 1);
another one
why you have delete rest of the videos???
Hi, I haven't deleted the videos. I just removed them from the playlist since the order of the videos didn't make sense anymore. Newer videos are planned for the future, however if you want to see the old ones I removed, you can find them on my channel.
Isn't strict_type = 1 kinda ironic? 😂
Thank you