12 Essential PHP Interview Questions


 Our Toptal Engineering Blog has published a great post called “12 Essential PHP Interview Questions,” and I think it would be of interest to all of you.

See the preview of article given below :

Consider the following code:
$str1 = ‘yabadabadoo’;
$str2 = ‘yaba’;
if (strpos($str1,$str2)) {
echo “\”” . $str1 . “\” contains \”” . $str2 . “\””;
} else {
echo “\”” . $str1 . “\” does not contain \”” . $str2 . “\””;
}
The output will be:
“yabadabadoo” does not contain “yaba”
Why? How can this code be fixed to work correctly?

To see more goto : http://www.toptal.com/php/interview-questions

Advertisements

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

%d bloggers like this: