<?php
<
echo 'Hello World';
?>
>
unset() sets a variable to “undefined” while unlink() deletes a file we pass to it from the file system.
count() function is used to return the number of elements in an array.
PHP 5 presents many additional OOP (Object Oriented Programming) features.
PEAR means "PHP Extension and Application Repository". It extends PHP and provides a higher level of programming for web developers.
php script.php
finalis introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overridden.
If we would like to pass values through a form or an URL, then we need to encode and to decode them using htmlspecialchars() and urlencode().
GD library is needed to execute image functions.
To be able to display a human-readable result we use print_r().
The functions are getimagesize() for size, imagesx() for width and imagesy() for height.
imagetypes() gives the image format and types supported by the current version of GD-PHP.
The result set can be handled using mysqli_fetch_array, mysqli_fetch_assoc, mysqli_fetch_object or mysqli_fetch_row.
The function mysqli_num_rows() returns the number of rows in a result set.
mysqli_affected_rows() return the number of entries affected by an SQL query.
It is possible to use the dedicated function, is_numeric() to check whether it is a number or not.
It is possible to use the dedicated function, ctype_alnum to check whether it is an alphanumeric value or not.
If we want to check whether a variable has a value or not, it is possible to use the empty() function.