Ans. The PHP Hpertext Pre-processor (PHP) is a programming language that allows web developers to create dynamix content that interacts with databases. PHP is a server side scripting language that is embedded in HTML.
Ans. The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's functionality. The php.ini file is read each time PHP is initialized.in other words, whenever httpd is restarted for the module version or with each script execution for the CGI version.
Ans. PHP provides a large number of predefined constants to any script which it runs known as magic constants.
Ans. There are several benefits of using PHP. First of all, it is totally free to use. So anyone can use PHP without any cost and host the site at a minimal cost.
Ans. When the value of a variable is used as the name of the other variables then it is called variable variables. $$ is used to declare variable variables in PHP.
$str = "PHP"; $$str = " Programming"; //declaring variable variables echo "$str ${$str}"; //It will print "PHP programming" echo "$PHP"; //It will print "Programming"
$text = "I like programming"; print_r (explode(" ",$text)); $strarr = array('Pen','Pencil','Eraser'); echo implode(" ",$strarr);
Ans. Zend Engine is used internally by PHP as a compiler and runtime engine. PHP Scripts are loaded into memory and compiled into Zend OPCodes.
Ans. These OPCodes are executed and the HTML generated is sent to the client.
Ans. The Zend Engine provides memory and resource management and other standard services for the PHP language. Its performance, reliability, and extensibility have played a significant role in PHP’s increasing popularity.
Ans. The PDF functions in PHP can create PDF files using PDFlib version 6. PDFlib offers an object-oriented API for PHP5 in addition to the function-oriented API for PHP4. There is also the » Panda module.
Ans. Magic methods are member functions that are available to all the instances of a class. Magic methods always start with ‘__’, for example, __construct(). All magic methods need to be declared as public.
Ans. PEAR is an acronym for PHP Extension and Application Repository. The purpose of PEAR is to provide:
Ans. Smarty is a template engine written in PHP. Typically, these templates will include variables—like {$variable}—and a range of logical and loop operators to allow adaptability within the templates.
Ans. Memcache is a technology that caches objects in memory such that a web application can get to them really fast. It is used by sites, such as Digg, Facebook, and NowPublic, and is widely recognized as an essential ingredient in scaling any LAMP.
Ans. We just have to run the PHP CLI (Command-line Interface) program and provide the PHP script file name as the command-line argument, for example, php myScript.php, assuming php as the command to invoke the CLI program.
Ans. 'final' is introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overridden.