PHP Questions


1. Who is the father of PHP ?
Rasmus Lerdorf is known as the father of PHP.


2. What is the difference between $name and $$name?
$name is variable where as $$name is reference variable like $name=sonia and $$name=singh so $sonia value is singh.


3. What are the method available in form submitting?
GET and POST


4.How can we get the browser properties using PHP?
<?php
echo $_SERVER[‘HTTP_USER_AGENT’].”\n\n”;
$browser=get_browser(null,true);
print_r($browser);
?>


5. What Is a Session?
A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.


6. How can we register the variables into a session?
<?php
session_register($ur_session_var);
?>
 

7. How many ways we can pass the variable through the navigation between the pages?
Register the variable into the session
Pass the variable as a cookie
Pass the variable as part of the URL

9) How can we display the output directly to the browser?
To be able to display the output directly to the browser, we have to use the special tags <?= and ?>.

10.  What is the main difference between PHP 4 and PHP 5?
PHP 5 presents many additional OOP (Object Oriented Programming) features.

Pageviews from the past week