Defining Functions in PHP, How to Define a Function in PHP, Codecademy Learn PHP, Create A Function

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=5iPQoeCTmNY



Category:
Tutorial
Duration: 2:29
68 views
1


In this PHP coding lesson, we take a look at Defining Functions in PHP, How to Define a Function in PHP, Codecademy Learn PHP, Create A Function. This is based on the "Introduction to PHP Functions" section in the course, "Learn PHP" on Codecademy. In this lesson, we learn how about defining functions in PHP. Learning how to define a function in PHP is the first step to understanding PHP functions. We learn that we use the function keyword when we start our function definition. After using the function keyword, we then name our function. Functions must begin with a letter or also an underscore. A function may be followed by any letter, number, or underscore. We then create a code block using curly brackets. Whatever code is inside the code block will be executed whenever we invoke the function. Once we have a defined function, we are able to invoke our function as many times as we want. We will be able to run the code within the code block, without having to copy or paste, or retype any code, only the function invocation. When naming a function, the naming convention is using camelCase. This is in opposition to variable names which use snake_case. Make sure your function describes what the function does. Thanks for watching Defining Functions in PHP, How to Define a Function in PHP, Codecademy Learn PHP, Create A Function. We will cover invoking functions in the next lesson!




Other Videos By We Will Code


2022-04-22How Variable Scope Works in PHP, Variable Scope Explained, Local vs Global Scope, PHP Function Scope
2022-04-21What is Pass By Reference in PHP, Pass By Reference Explained, Learn PHP Codecademy, Parameter Alias
2022-04-21Default Parameters in PHP, Default Parameters in Functions, PHP on Codecademy PHP Default Arguments
2022-04-20Multiple Parameters in PHP, Using Multiple Function Parameters in PHP, Codecademy Learn PHP Coding
2022-04-19Function Parameters Explained, What are Parameters and Arguments in PHP, Passing in Arguments in PHP
2022-04-19What is Null in PHP, Returning Null Explained in PHP, Null Values in Programming, Codecademy PHP
2022-04-19PHP Function Return Values, PHP Return Values Explained, Codecademy PHP, Understand Return Values
2022-04-19More on Return Statements, PHP Codecademy Free Programming Course, PHP Return Keyword, PHP Functions
2022-04-19Return Statements Explained, What is a Return Statement in PHP, Codecademy PHP, Return Statements
2022-04-18Invoking Functions Explained in PHP, How to Invoke a Function in PHP, Function Invocation Codecademy
2022-04-18Defining Functions in PHP, How to Define a Function in PHP, Codecademy Learn PHP, Create A Function
2022-04-18Intro to PHP Functions, Learn PHP on Codecademy, Intro to PHP Functions, What are Functions in PHP
2022-04-18PHP Numbers Review, Learn PHP on Codecademy, Number Data Types, Math Operators, Order of Operations
2022-04-17PHP Mathematical Assignment Operators, Codecademy Learn PHP, Shorthand Assignment Operators in PHP
2022-04-17How Order of Operations Works in PHP, Codecademy Learn PHP Operator Precedence, PHP Operator Order
2022-04-16How Modulo Works in PHP, Understanding Modulo in Programming, What is Modulo in PHP, Codecademy Help
2022-04-15Exponentiation Explained in PHP, How Exponents Work in PHP, Learn about PHP Exponents, Codecademy
2022-04-15Multiplication and Division in PHP Explained, PHP Numbers, Codecademy Learn PHP for Beginners Guide
2022-04-14Using Number Variables Explained in PHP, Codecademy's Learn PHP, Creating Number Variables using PHP
2022-04-14Addition and Subtraction in PHP, Adding in PHP, Subtracting in PHP, Learn PHP Numbers, Codecademy
2022-04-14PHP Numbers Explained, Types of Numbers, Learn PHP, Codecademy Integer and Floating Point Data Type



Tags:
Coding
Learn PHP
PHP
Programming
Server-side
back-end
code tutorial
tutorials