Priti's Technical Corner

December 21, 2008

PHP Interview Questions

Filed under: Interview, PHP — Tags: , , — pritisolanki @ 3:56 pm

Question 1: Explain various types in PHP?
Answer 1:
There are Four scalar types: Boolean, integer, float, string
Two compound types: Array, object
Special types: resources, NULL
Pseudo types:mixed,number,callback.

Question 2: What is regular expression?
Answer 2: regular expressions provide a concise means for identifying string in subject string.

Question 3: what is Type juggling?
Answer 3: PHP does not require (or support) explicit type definition in variable declaration; a variable’s type is determined by the context in which the variable is used.

Question4: What is difference between “heredoc” and “nowdocs”?
Answer 4: Nowdocs are single quoted string where as heredocs are double quotes string in which variable is parsed to its value.

Question 5: What is complex syntax?
Answer 5: when in PHP you want to use complex expression {} is used.
Ex: echo “this is {$g}”

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: