Unique Features of PHP

PHP is a popular language and contains many features. Some of those features are common as that are provided by many programming languages like C, C++, Perl and more. Also, PHP contains unique features of its own. In this article, we are going to list some of the unique features of PHP.

php_unique_features

S.No Features
1.  Loosely Typed Language – PHP supports variable usage without declaring its data type. It will be taken at the time of the execution based on the type of data it has on its value.
2.  Cross Platform Compatibility – It is used to create the desktop application by using advanced PHP features.
3.  variable variables – PHP allows changing the variable name dynamically by using variable variables.
4.  Real-Time Access Monitoring – PHP provides access logging by creating the summary of recent accesses for the user.
5.  Magic Method – PHP has built in methods starts with __ (double underscore). These methods can’t be called directly. Rather, it will be called on the event basis. For example, __clone() will be called, when the clone keyword is used.
6.  Error Reporting –  It has some predefined error reporting constants to generate a warning or error notice. For example, when E_STRICT is enabled, a warning about deprecated methods will be generated.
7.  Extended Regular Expression – PHP provides REGEX methods with extensive parsing and pattern matching mechanism with remarkable speed.
8.  nowdocs and heredocs String –  PHP provides the nowdocs and heredocs properties are used to delimit some block of context.  nowdocs and heredocs are same except the context in the heredocs allow variable parsing.
9.  Traits – PHP is a single inheritance language. The traits concept is used to cover inheritance limitation and support inheritance at multiple levels.

This PHP code tutorial was published on April 14, 2013.

↑ Back to Top