PHP

PHP_SELF

PHP_SELF – What It Is, and Why It’s Too Dangerous to Use [WARNING]

This article outlines the PHP_SELF attribute of the $_SERVER system information variable and why you should never, ever use it. What is _$SERVER? Check out our full article on $_SERVER here – but in short, it’s a variable containing an array with information about your PHP environment – including server… Read More »PHP_SELF – What It Is, and Why It’s Too Dangerous to Use [WARNING]

PHP exit die

Using the PHP ‘exit’ (AKA ‘die’) Function to Terminate your Script [Examples]

This short article will explain the PHP exit function and how it is used to quit/exit/terminate a PHP script. PHP exit Function Syntax The syntax for the PHP exit function is as follows: exit(STATUS) Note that: exit will terminate the execution of the script at the point it is called… Read More »Using the PHP ‘exit’ (AKA ‘die’) Function to Terminate your Script [Examples]

PHP round()

How to Round Numbers (Integer, Decimals) in PHP with the round() Function

This article will show you how to round numbers in PHP with the round() function, including rounding to the nearest integer or a set number of decimal places. Why Round Numbers? There are various reasons you may want to round numbers. You don’t need incredible accuracy for… Read More »How to Round Numbers (Integer, Decimals) in PHP with the round() Function