4 Things you Didn’t Know about PHP Web Development
September 19th, 2010 § Leave a Comment
PHP (PHP: Hypertext Preprocessor) is a general purpose scripting language mainly used to design certain dynamic and interactive web pages. For this particular and complex purpose, the PHP code is embedded in the HTML source documents. This is generally processed by the interpreter application and may also perform as a graphical application. PHP is now available as the processor for most of the servers across the world and works with most of the operating systems. This is one of the major reasons why it has become so popular. Moreover, the time needed to load a PHP web page is comparatively low.
However, besides being one of the most popular server side-scripting language, PHP is widely used by web developers and programmers. Nevertheless, there are certain interesting facts that you probably had missed about PHP. But these are not unknown to you. Let us look out for some interesting facts about PHP that probably you have not come across.
- #1: PHP is capable of partially validating email addresses by checking the domain name and confirming that it exists. This built-in function works to ensure that a particular domain name resolves to a specific IP address. This is based on ‘Checkdnsrr’ and validates the email address.
- #2: With PHP you can also prevent the sensitive error messages from being shown to the other users and all you have to do is to use the error reporting function. Though it is said that, ideally, the PHP error reporting function should be disabled on the production server from within, but on a shared webhost, it is best to add the php.ini. This efficiently prevents the potentially sensitive SQL queries and path names from being displayed and is especially helpful when things go wrong.
- #3: Another interesting feature of PHP that probably you were unaware of is that the PHP is capable of returning multiple values from a particular function by using the ‘by reference’ parameters instead of using the ‘by value’. Also you can use ip2long() and the longip2() to store the IP address, and interestingly this reduces the storage space by almost one-fourth. Indirectly, this helps to speed up the searches and also decide which IP addresses falls on which addresses.
- #4 and #5: Some other interesting facts about PHP also include that the original abbreviation stood for personal home page and is installed on over 20 million websites with one million web servers. Also almost 75% of the Web 2.0 sites are built in PHP has there are as many as 5 million PHP developers all over the world!
