PHP Tutorials - page 3
A collection of tutorials for learning PHP.
- How to count the number of characters in a multi-byte string using PHP.
- Backslashes in replacement string seem to disappear when the replacement is done using preg_replace
- How to create a custom error handler for PHP that handles non-fetal errors.
- PHP does not have named parameters build-in, but in this tutorial you can learn how to simulate the functionality with a bit of extra code.
- How to properly validate input from PHP using preg_match, and avoid undefined notices.
- How to get a list of included files and know if a certain file was included by PHP.
- Lean to find the common multiples between two numbers in PHP; the tutorial starts by teaching you about multiples, then moves on to common multiples.
- This tutorial shows how to check if a number is a decimal number using the PHP floor function.
- We can access other classes properties (variables) and methods (functions) by injecting the class object in the class that needs it.
- Should you use file_get_contnts or cURL when performing HTTP requests from PHP? It does not matter; but regardless of which you use, you should still handle errors properly!