PHP Front To Back [Part 6] - Functions

preview_player
Показать описание
In this part we will look at user defined functions and some naming conventions. We are almost to the cool stuff :)

CODE: Code For This Video

COURSES: Premium Eduonix Courses

SHOW YOUR SUPPORT

ONE TIME DONATIONS:
Рекомендации по теме
Комментарии
Автор

I am so grateful to you Brad. I know it sounds like every other comment on your videos but I truly mean it. My brother even pays for my teamtree house and he gets quite irritated bcuz even if I can go learn from there I prefer learning from your channel. Your teaching skills are very amazing, to the point, smooth and simple. I can't currently become a Patreon but I make sure I see all the adds that pops up just to do what I can to help you in any little way possible.

MaazKhan-qeth
Автор

Thanks, quick question: Why is the first value 10 at the end? Shouldn't it be 10+5?

stuffedcrustpizza
Автор

The difference between you and your crash courses and a lot of teachers on sites where I've taken full courses, is that you're a good teacher. I'd love if these were more in depth, but I know if I watch enough of your other videos, I'll see examples you overlooked or didn't have time to include. Another nice thing, is you're willing to update your videos so regularly when it's called for. Headache. I recommend to anyone trying to learn web development, study Traversy Videos before you ever take bigger courses. It'll save you time and headache. This guy is to the point and answers a lot of question in a short time. Personally, I'm going to cancel a subscription I have elsewhere next month, and just kick a few bucks this way when I can. My favorite teachers... Brad and myself. Send this guy money. He does more for free than many other will do for money. That's a teacher.

陈瀚龙
Автор

&
I never thought something so small could give me so much anxiety. XD

singularity
Автор

Want to learn so I can use with Wordpress and Magento

Aimopotis
Автор

Wow, basically the '&' before a param can make the function to change a globally scoped variable!

samuelpimenta
Автор

If you are using Adblock on chrome, then do this:

Click the AdBlock button in the browser toolbar and select Options.
On the GENERAL tab, select Allow whitelisting of specific YouTube channels.
Restart your browser. Don't skip this step!
Visit Traversy Media YouTube channel click on Adblock extension and select "whitelist Traversy Media".

This will apply to only this channel, so there you go for those who can't donate him :)

incountrymusic
Автор

Brad, what font-face did you use for "function". Also, it does not look like you are using ligatures. How did you get the word styled separately?

taariqq
Автор

Only thing I might add is a little more explanation of the terms By Value and By Reference. Where By Reference means you are sending a reference of the exact variable to the function. And By Value means you are only sending the same "value' of the variable therefore the $num inside the function is a separate occurrence of that value than the $num outside of the function. I know I always get confused with these 2 types and have to look them up all the time to understand what is going on.

kevinerose
Автор

Hey man, just wanted to thank you for your php tutorials. I recently moved and php is everywhere here. Getting up to speed pretty fast with your tutorials. thanks!

viltstiftable
Автор

why addFive() didn't out put 15? dont get

carlagoncalves
Автор

With PHP can you assign a variable with the returned value of a function like you can is Javascript ? e.g

$total = addNumbers(3, 4);

function addNumbers($num1, $num2) {

return $num1 + $num2;
}

echo $total;

IamTiernO
Автор

now i know why most people hate b/c the $ sign

hailuznabu
Автор

Anyone is using vscode for this? If so, what is your vs extension? I am trying different formatters, but the results are rather disappointed. Thanks.

Toleh
Автор

At 5:56 when you chose to use double quotes instead of single quotes, I'm guessing it is because when you make $name equal 'World', $name must be wrapped in double quotes or cause an error. I tried switching out the doubles for singles and got an error. Am I right?

keithhunt
Автор

I can See Abdul Sattar Edhi on Google. Makes me Sad, RIP Legend

CodeProHassam
Автор

ooo the Ampersand can be a dangerous little shit

wonderram
Автор

Please what do you mean when you say passing by reference and why is it necessary?
(&$num )

rotimibest
Автор

Learning PHP through your series on PHP Front to Back. You're an excellent teacher, looking forward to each one of your future uploads in this series.
and btw, your channel is very quickly becoming my go-to place whenever I need to refresh something I forgot, or learn something new. Your crash courses and wide array of content from all sorts of areas of programming make it extremely useful as a resource for future developers. Thank you for your hard work.

armaandhanji
Автор

That 'pass-by-reference'. Is that the same as 'the-address-of' in C?

taariqq