Tag Archives: PHP-basics

PHP Filter is an extension that filters the data by either sanitizing or validating it. It plays a crucial role in security of a website,… Read More
The <php is used to identify the start of a PHP document. In PHP whenever it reads a PHP document, It looks for: filter_none edit… Read More
Enumeration (or enum) is mainly used to assign names to integral constants, the names make a program easy to read and maintain. In PHP, enumeration… Read More
Given a PHP class object and the task is to convert or cast this object into object of another class. Approach 1: Objects which are… Read More
PHP is a widely-used open source and general purpose scripting language which is primarily made for web development. It can be merged into the HTML.… Read More
In PHP, errors and warnings can be logged into a file by using a php script and changing configuration of php.ini file. Two such approaches… Read More
In PHP, callback is a function object/reference with type callable. A callback/callable variable can act as a function, object method and a static class method.… Read More
By default, PHP variables are passed by value as the function arguments in PHP. When variables in PHP is passed by value, the scope of… Read More
Problem: How to use a switch case ‘or’ in PHP? Solution: This can be achieved in 2 ways. They are as follows: Method 1: Without… Read More
Script execution time in PHP is the time required to execute the PHP script. To calculate script execution time use clock time rather than the… Read More
Prerequisite: Types of Error PHP is used for web development. Error handling in PHP is almost similar to error handling in all programming languages. The… Read More
‘AND’ Operator The AND operator is called logical operator. It returns true if both the operands are true. Example: filter_none edit close play_arrow link brightness_4… Read More
Variables Variables in a program are used to store some values or data that can be used later in a program. PHP has its own… Read More
The $ operator in PHP is used to declare a variable. In PHP, a variable starts with the $ sign followed by the name of… Read More
Euler’s Number or commonly known as e is a very popular irrational number which approximates to 2.718281828 and is one of the most important mathematical… Read More