⚙️
PHP Tools Hub
Tools
PHP
Quick
Contact
Home
>
Tutorials
>
PHP
>
PHP Functions
PHP Functions Tutorials
81 tutorials found.
📘
Access Any Global
GLOBALS Array | $GLOBALS Usage | PHP
📘
ampersand param
Pass by Reference | Syntax | PHP
📘
colon type
Return Type Declaration | Syntax | PHP
📘
declare strict_types 1
Strict Types | Declaration | PHP
📘
fn param expression
Arrow Functions | PHP 7.4 Syntax | PHP
📘
funcName variable
Variable Functions | Syntax | PHP
📘
Function as Parameter
Callback Functions | Definition | PHP
📘
Function Calls Itself
Recursion | Definition | PHP
📘
function functionName
User Defined | Syntax | PHP
📘
function name param1 param2
Parameters | Syntax | PHP
📘
function without name
Anonymous Functions | Syntax | PHP
📘
Inside Function Only
Function Scope | Local Variables | PHP
📘
int string array
Type Declarations | Parameter Types | PHP
📘
param default value
Default Parameters | Syntax | PHP
📘
paramName colon value
Named Arguments | PHP 8 Syntax | PHP
📘
Represent Anonymous Function
Closure | Closure Class | PHP
📘
Returns null
Void Function | No Return | PHP
📘
Send Value Back
Return Values | return Statement | PHP
📘
Start Letter Underscore
Naming Rules | Valid Names | PHP
📘
static counter
Static Variables | static Keyword | PHP
📘
three dots param
Variadic Parameters | Syntax | PHP
📘
Variable Length Arguments
Variadic Functions | Three Dots Syntax | PHP
📘
array_fill start_index 0
Named Arguments | Example | PHP
📘
assign to variable
Anonymous Functions | Example | PHP
📘
Call Callback Function
Callback Functions | call_user_func | PHP
📘
Clone Closure with New This
Closure | bind Method | PHP
📘
factorial Function
Recursion | Example | PHP
📘
First Statement in File
Strict Types | Location | PHP
📘
fn a b a plus b
Arrow Functions | Example | PHP
📘
function add int num
Type Declarations | Example | PHP
📘
function addFive ampersand num
Pass by Reference | Example | PHP
📘
function greet name Guest
Default Parameters | Example | PHP
📘
function sum three dots numbers
Variadic Parameters | Example | PHP
📘
global Keyword
Function Scope | Global Access | PHP
📘
GLOBALS count increment
GLOBALS Array | Example | PHP
📘
greet Function
User Defined | Example | PHP
📘
Numbers Special Chars
Naming Rules | Invalid Names | PHP
📘
Pass Values to Function
Parameters | Usage | PHP
📘
Persists Between Calls
Static Variables | Behavior | PHP
📘
return result
Return Values | Example | PHP
📘
strlen via variable
Variable Functions | Example | PHP
📘
Variadic with Type Hints
Variadic Functions | Type Declaration | PHP
📘
Bind Closure to Object
Closure | bindTo Method | PHP
📘
Call with Array Parameters
Callback Functions | call_user_func_array | PHP
📘
Code After return Ignored
Return Values | Function Stops | PHP
📘
countVisits Function
Static Variables | Example | PHP
📘
Defaults on Right
Default Parameters | Right Side Only | PHP
📘
global varName
Function Scope | global Keyword Usage | PHP
📘
greet GREET Same
Naming Rules | Case Insensitive | PHP
📘
No return Keyword
Arrow Functions | Implicit Return | PHP
📘
Numbers as Array
Variadic Parameters | Usage | PHP
📘
Original Variable Modified
Pass by Reference | Effect | PHP
📘
Parameters Reorderable
Named Arguments | Any Order | PHP
📘
Stack Overflow Risk
Recursion | Limit | PHP
📘
Sum Function
Variadic Functions | Example | PHP
📘
Type Mismatch TypeError
Strict Types | Effect | PHP
📘
use keyword for scope
Anonymous Functions | Closure | PHP
📘
Call Closure Bound to Object
Closure | call Method | PHP
📘
Check if Callable
Callback Functions | is_callable | PHP
📘
func_num_args Method
Variadic Functions | Before PHP 5.6 | PHP
📘
global count increment
Function Scope | Example | PHP
📘
Parameter Name Pass
Named Arguments | PHP 8.0 | PHP
📘
Short Closure Syntax
Arrow Functions | PHP 7.4 | PHP
📘
Anonymous Function as Callback
Callback Functions | Closure Example | PHP
📘
Convert Callable to Closure
Closure | fromCallable Method | PHP
📘
Count Arguments
Variadic Functions | func_num_args | PHP
📘
fn x y x plus y
Arrow Functions | Example | PHP
📘
htmlspecialchars with Named
Named Arguments | Example | PHP
📘
Apply Callback to Array
Callback Functions | Array Map Example | PHP
📘
Automatic Variable Binding
Arrow Functions | Parent Scope | PHP
📘
Event Handlers
Closure | Use Case | PHP
📘
Get Single Argument
Variadic Functions | func_get_arg | PHP
📘
Skip Optional Parameters
Named Arguments | Skipping Defaults | PHP
📘
Currying Functions
Closure | Use Case | PHP
📘
Filter with Callback
Callback Functions | Array Filter Example | PHP
📘
Get All Arguments
Variadic Functions | func_get_args | PHP
📘
Parameters Any Order
Named Arguments | Order Independence | PHP
📘
Single Expression Only
Arrow Functions | No Multi Statement | PHP
📘
Implicit Return
Arrow Functions | No Return Keyword | PHP
📘
Named After Positional
Named Arguments | Combine Positional | PHP
📘
Sort with Callback
Callback Functions | usort Example | PHP