- Recursive acronym for PHP: Hypertext Preprocessor.
- The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer.
- Is mainly focused on server-side scripting, so you can do anything any other CGI program can do, such as collect form data, generate dynamic page content, or send and receive cookies.
- Can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, macOS, RISC OS, and probably others.
One of the strongest and most significant features in PHP is its support for a wide range of databases.
Three main areas where PHP scripts are used
- Server-side scripting.
- Command line scripting.
- Writing desktop applications.
Your first PHP-enabled page
- Create a file named hello.php and put it in your web server's root directory (DOCUMENT_ROOT).
- Use your browser to access the file with your web server's URL, ending with the /hello.php file reference. When developing locally this URL will be something like http://localhost/hello.php or http://127.0.0.1/hello.php but this depends on the web server's configuration.
Dealing with Forms
Escaping from HTML
- PHP: Three main areas where PHP scripts are used
- PHP: Your first PHP-enabled page
- PHP: Dealing with Forms
- Dealing with Forms: A simple HTML form
- PHP tags
- PHP tags: If a file contains only PHP code
- PHP: Escaping from HTML
- Escaping from HTML: Advanced escaping using conditions
- PHP: Comments
- PHP primitive types
- PHP types
- integer: Integer overflow
- integer: Converting to integer
- float: Floating point precision
- Syntax: Double quoted
- Syntax: Heredoc syntax
- Syntax: Nowdoc syntax
- String: String access and modification by character
- String: Converting to string
- Variables in PHP
- Predefined Variables
- object: Converting to object
- callback: Passing