We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Your first PHP extension - Christian Rades
Your first PHP extension - Christian Rades: Learn how to create your first PHP extension using the readline extension and custom PHP configuration, covering PHP functions, variables, and more.
- It’s necessary to use the readline extension and custom PHP configuration when building a PHP extension.
- PHP functions do not return a string, but rather a result variable with no semicolon.
-
The
clonekeyword is used to create a reference to the original value. -
The
mutkeyword is used to specify whether a reference is immutable or mutable. - In Rust, you can specify the type of reference you want, including immutable or mutable.
-
The
returnkeyword can be omitted when returning a value from a function. -
The
letkeyword is used to declare a variable and initialize it with a value. -
The
pubkeyword is used to specify that a function or variable is public and can be accessed from outside the module. -
The
traitsystem in Rust allows for abstract methods that can be implemented by concrete types. -
The
matchstatement in Rust is used to perform pattern matching on a value. -
The
selfparameter in Rust is a special variable that refers to the current instance of the struct. -
The
implblock in Rust is used to define the implementation of a trait. -
The
extendmethod in Rust is used to extend the functionality of a trait. -
The
forloop in Rust is used to iterate over a sequence of values. -
The
closurein Rust is a function that can be passed as an argument to another function. -
The
asynckeyword in Rust is used to define an asynchronous function. -
The
awaitkeyword in Rust is used to wait for the completion of an asynchronous operation. -
The
traitsystem in Rust is used to define a contract that must be implemented by concrete types. -
The
matchstatement in Rust is used to perform pattern matching on a value. -
The
matchstatement in Rust can be used to match on the type of a value. -
The
ifstatement in Rust can be used to check the truth of a condition and execute code accordingly. -
The
ifstatement in Rust can be used to execute code when a condition is true. -
The
elsestatement in Rust can be used to execute code when a condition is false. -
The
switchstatement in Rust can be used to match on the value of an expression. -
The
defaultbranch in Rust can be used to specify a default behavior when none of the other branches match. -
The
panicfunction in Rust can be used to exit the program when an error occurs. -
The
unwrapfunction in Rust can be used to unwrap an optional value. -
The
mapfunction in Rust can be used to transform an optional value into another value. -
The
filterfunction in Rust can be used to filter a sequence of values based on a predicate. -
The
collectfunction in Rust can be used to collect a sequence of values into a single value. -
The
foldfunction in Rust can be used to reduce a sequence of values into a single value. -
The
flattenfunction in Rust can be used to flatten a sequence of sequences. -
The
sortfunction in Rust can be used to sort a sequence of values. -
The
sumfunction in Rust can be used to compute the sum of a sequence of values. -
The
productfunction in Rust can be used to compute the product of a sequence of values. -
The
enumeratefunction in Rust can be used to iterate over a sequence of values and their indices. -
The
chunkfunction in Rust can be used to divide a sequence of values into smaller sequences. -
The
map_reducefunction in Rust can be used to map and reduce a sequence of values.