Php technical interview questions

1. United Nations agency is that the father of PHP ?

Rasmus Lerdorf is thought because the father of PHP.


2. what's the distinction between $name and $name?

$name is variable wherever as $name is reference variable like $name=sonia and $name=singh thus $sonia price is singh.

3. What area unit the tactic offered in type submitting?

GET and POST


4.How will we tend to get the browser properties victimization PHP?

<?php

echo $_SERVER[‘HTTP_USER_AGENT’].”\n\n”;
$browser=get_browser(null,true);
print_r($browser);
?>

5. what's a Session?

A session may be a logical object created by the PHP engine to permit you to preserve knowledge across ulterior HTTP requests. Sessions area unit usually accustomed store temporary knowledge to permit multiple PHP pages to supply an entire practical dealings for an equivalent traveler.

6. however will we tend to register the variables into a session?

<?php
session_register($ur_session_var);
?>

7. what number ways that we are able to 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 a part of the universal resource locator

8. however will we all know the overall range of parts of Array?

sizeof($array_var)
count($array_var)

9. however will we tend to produce a info victimization php?

mysql_create_db();

10. what's the practicality of the operate strstr and stristr?

strstr() returns a part of a given string from the primary prevalence of a given substring to the tip of the string.
For example:strstr("user@example.com","@") can come "@example.com".
stristr() is idential to strstr() except that it's case insensitive.

11. What area unit cryptography functions in PHP?

CRYPT(), MD5()


12. the way to store the uploaded file to the ultimate location?

move_uploaded_file( string computer filename, string destination)

13. justify mysql_error().

The mysql_error() message can tell North American country what was wrong with our question, the same as the message we might receive at the MySQL console.

14. what's Constructors and Destructors?

CONSTRUCTOR : PHP permits developers to declare creator ways for categories. categories that have a creator methodology decision this methodology on every newly-created object, thus it's appropriate for any low-level formatting that the item might have before it's used.
DESTRUCTORS : PHP five introduces a destructor idea the same as that of different object-oriented languages, like C++. The destructor methodology are going to be known as as before long as all references to a specific object area unit removed or once the item is expressly destroyed or in any order in closure sequence.

15. justify the visibility of the property or methodology.

The visibility of a property or methodology should be outlined by prefixing the declaration with the keywords public, protected or personal.
Class members declared public is accessed everyplace.
Members declared protected is accessed solely inside the category itself and by transmitted and parent categories.
Members declared as personal might solely be accessed by the category that defines the member.

16. What area unit the variations between Get and post ways.

There area unit some defference between GET and POST methodology
1. GET methodology have some limit like solely 2Kb knowledge able to tell request
But in POST methodology unlimited knowledge will we tend to send
2. after we use GET methodology requested knowledge show in universal resource locator however
Not in POST methodology thus POST methodology is sweet for send sensetive request

17. What area unit the variations between need and include?

Both embody and need accustomed embody a file however once enclosed file not found
Include send Warning wherever as need send Fatal Error

18. what's use of header() operate in php ?

The header() operate sends a raw HTTP header to a shopper.We can use herder()
function for redirection of pages. it's vital to note that header() should
be known as before any actual output is seen.

19. List out the predefined categories in PHP?

Directory
stdClass
__PHP_Incomplete_Class
exception
php_user_filter

20. What sort of inheritance that PHP supports?

In PHP Associate in Nursing extended category is often addicted to one base category,that is, multiple inheritance isn't supported. categories area unit extended victimization the keyword 'extends'.

21. however will we tend to inscribe the username and arcanum victimization php?

You can inscribe a arcanum with the subsequent Mysql>SET PASSWORD=PASSWORD("Password");
We can write in code knowledge victimization base64_encode($string) and might decipher victimization base64_decode($string);

22. what's the distinction between explode and split?

Split operate splits string into array by regular expression. Explode splits a string into array by string.
For Example:explode(" and", "India and Islamic Republic of Pakistan and Srilanka");
split(" :", "India : Islamic Republic of Pakistan : Srilanka");
Both of those functions can come Associate in Nursing array that contains Asian nation, Pakistan, and Srilanka.

23. however does one outline a constant?

Constants in PHP area unit outlined victimization define() directive, like define("MYCONSTANT", 100);

24. however does one pass a variable by price in PHP?

Just like in C++, place Associate in Nursing punctuation mark before of it, like $a = &$b;


25. What will a special set of tags <?= and ?> liquidate PHP?

The output is displayed on to the browser.

26. however does one decision a creator for a parent class?

parent::constructor($value)

27. What’s the special that means of __sleep and __wakeup?

__sleep returns the array of all the variables than got to be saved, whereas __wakeup retrieves them.

28. what's the distinction between PHP and JavaScript?

javascript may be a shopper facet scripting language, thus javascript will build popups and different things happens on someone’s computer. whereas PHP is server facet scripting language thus it will each stuff with the server.

29. what's the distinction between the functions unlink and unset?

unlink() deletes the given file from the classification system.
unset() makes a variable indefinite.

30. what number ways that will we tend to get the worth of current session id?

session_id() returns the session id for the present session.

31. What area unit default session time and path?

default session time in PHP is 1440 seconds or twenty four minutes
Default session save path id temporary folder /tmp

32. for image work that library?

we will got to compile PHP with the GD library of image functions for this to figure. GD and PHP may additionally need different libraries, betting on that image formats you would like to figure with.

33. however will we tend to get second of the present time victimization date function?

<?php
$second = date(“s”);
?>

34. What area unit the data formatting and Printing Strings offered in PHP?

printf()- Displays a formatted string
sprintf()-Saves a formatted string during a variable
fprintf() -Prints a formatted string to a file
number_format()-Formats numbers as strings

35. however will we discover the amount of rows during a result set victimization PHP?

$result = mysql_query($sql, $db_link);
$num_rows = mysql_num_rows($result);
echo "$num_rows rows found";

Faridabad Ford | Best Ford Showroom and Dealership in Faridabad

Welcome to Faridabad Ford, the largest & best ford showroom and dealership in Faridabad, your Biggest Ford Dealer for New and Used Car Sales, Servicing, Parts and Accessories.

Ghaziabad Ford | Best Ford Showroom and Dealership in Ghaziabad

Welcome to Ghaziabad Ford, the largest & best ford showroom and dealership in Ghaziabad, your Biggest Ford Dealer for New and Used Car Sales, Servicing, Parts and Accessories. We can help make your process of Buying, Servicing or Selling your car a lot easier.

List of Backlinks
http://www.faridabadford.com/
http://www.ghaziabadford.com/

List of Backlinks

http://cmul.unilag.edu.ng/cmul-inducts-106-medical-and-dental-surgeons/#comment-210156

https://tabowles.wordpress.ncsu.edu/emerging-principles/#comment-39755

http://pts-windischgarsten.eduhi.at/4images/details.php?image_id=22

http://web.stanford.edu/dept/bosp/cgi-bin/blog/oaxaca17/index.php/2017/04/05/katies-intro-post/#comment-99999

https://www.ocf.berkeley.edu/~sather/avoiding-the-lobster-look-sunburns-sunscreen-and-spf-explained/#comment-320330

http://psyc342a.colgate.edu/about/?unapproved=20423&moderation-hash=ab279dfda2428985410b57e15028cda5#comment-20423

https://blogs.miamioh.edu/aaa201c/2016/11/pocky-sharing-happiness/#comment-195184

https://www.icsb.edu.bd/team-listing/#comment-374158

http://staff.fysh.tc.edu.tw/excellence/?p=380#comment-605945

http://cmul.unilag.edu.ng/cmul-inducts-106-medical-and-dental-surgeons/#comment-210118

https://tabowles.wordpress.ncsu.edu/emerging-principles/#comment-39715

http://pts-windischgarsten.eduhi.at/4images/details.php?image_id=22&sessionid=de945d6ec79e74095e4dc075933b90bc

http://web.stanford.edu/dept/bosp/cgi-bin/blog/oaxaca17/index.php/2017/04/05/katies-intro-post/#comment-99879

https://www.ocf.berkeley.edu/~sather/avoiding-the-lobster-look-sunburns-sunscreen-and-spf-explained/#comment-319994

http://psyc342a.colgate.edu/about/?unapproved=20408&moderation-hash=7d42adabe4b7a266b825f40081440317#comment-20408

https://blogs.miamioh.edu/aaa201c/2016/11/pocky-sharing-happiness/#comment-195098

https://www.icsb.edu.bd/team-listing/#comment-374065

http://staff.fysh.tc.edu.tw/excellence/?p=380#comment-605708

https://blogs.miamioh.edu/aaa201c/2016/11/different-cultures-understand-time-differently/#comment-196297

http://syncd.commons.yale-nus.edu.sg/2015/06/16/hold-fast-dancing-for-the-victims-of-typhoon-haiyan/#comment-130163

http://americas.ccs.miami.edu/634-2/#comment-76331

https://generalsinjoburg.academic.wlu.edu/cultural-dance-festival-joubert-park-johannesburg-south-africa-march-2008/#comment-1233

https://jaipuria.edu.in/kanpurschool/portfolio/camp4/#comment-196424

http://quote.ucsd.edu/eds/2016/03/02/investing-in-californias-african-american-students/#comment-68070

https://council.csie.ntu.edu.tw/cscamp/2016/index.php/bulletboard/#comment-46026

https://scout.wisc.edu/Weblog/20110608?page=14#comment-1656

http://www.unae.edu.py/innova/index.php?option=com_k2&view=item&id=16:sample-item-15&limitstart=0

https://myluthernet.luthersem.edu/ICS/Academics/LL/LL_101/2012_U1-LL_101-2013.06_50/Main_Page.jnz?portlet=Announcements&screen=View+Post&screenType=next&Id=b26f87a6-7ddd-46f2-959c-c8af534b6be0

https://blogs.miamioh.edu/aaa201c/2016/11/different-cultures-understand-time-differently/#comment-196297

http://syncd.commons.yale-nus.edu.sg/2015/06/16/hold-fast-dancing-for-the-victims-of-typhoon-haiyan/#comment-130163

http://americas.ccs.miami.edu/634-2/#comment-76331

https://generalsinjoburg.academic.wlu.edu/cultural-dance-festival-joubert-park-johannesburg-south-africa-march-2008/#comment-1233

https://jaipuria.edu.in/kanpurschool/portfolio/camp4/#comment-196424

http://quote.ucsd.edu/eds/2016/03/02/investing-in-californias-african-american-students/#comment-68070

https://council.csie.ntu.edu.tw/cscamp/2016/index.php/bulletboard/#comment-46026

https://scout.wisc.edu/Weblog/20110608?page=14#comment-1656

http://www.unae.edu.py/innova/index.php?option=com_k2&view=item&id=16:sample-item-15&limitstart=0

https://myluthernet.luthersem.edu/ICS/Academics/LL/LL_101/2012_U1-LL_101-2013.06_50/Main_Page.jnz?portlet=Announcements&screen=View+Post&screenType=next&Id=b26f87a6-7ddd-46f2-959c-c8af534b6be0

http://cmul.unilag.edu.ng/cmul-inducts-106-medical-and-dental-surgeons/#comment-210156

https://tabowles.wordpress.ncsu.edu/emerging-principles/#comment-39755

http://pts-windischgarsten.eduhi.at/4images/details.php?image_id=22

http://web.stanford.edu/dept/bosp/cgi-bin/blog/oaxaca17/index.php/2017/04/05/katies-intro-post/#comment-99999

https://www.ocf.berkeley.edu/~sather/avoiding-the-lobster-look-sunburns-sunscreen-and-spf-explained/#comment-320330

http://psyc342a.colgate.edu/about/?unapproved=20423&moderation-hash=ab279dfda2428985410b57e15028cda5#comment-20423

https://blogs.miamioh.edu/aaa201c/2016/11/pocky-sharing-happiness/#comment-195184

https://www.icsb.edu.bd/team-listing/#comment-374158
http://staff.fysh.tc.edu.tw/excellence/?p=380#comment-605945

Comments

Popular posts from this blog

Software Development Services in India.

Full Syllabus of PHP

Every developer should have a blog - Software Development Delhi