PHP interview questions and answers collection
Showing posts with label
tricks
.
Show all posts
Showing posts with label
tricks
.
Show all posts
Thursday, April 8, 2010
stristr trick questions
What is output of the following
echo stristr('user@EXAMPLE.com', 'R'); //
echo stristr('user@EXAMPLE.com', 'r'); //
Output
r@EXAMPLE.com
r@EXAMPLE.com
The stristr is case insensitive.
strstr trick questions
What is output of the following
strstr("php@interview",'@');
strstr("php@interview",'@',true);
Answer
@interview
php
This is the mostly asked interview question
Wednesday, April 7, 2010
captcha in php
Question: What is captcha in
php
Answer
Captcha is nothing but an image which contains numbers,characters with an distorted background
Acronym for
captcha
is
Completely Automated Public Turing test to tell Computers and Human Apart
Simply saying : It is a mechanism for protecting spams in an application.
Tuesday, April 6, 2010
Explain Static keyword in php
Answer
Declaring class members or methods as static makes them accessible without needing an instantiation of the class. A member declared as static can not be accessed with an instantiated class object (though a static method can).
Saturday, April 3, 2010
what is Variable variables
Answer:
A variable variable takes the value of a variable and treats that as the name of a variable
The above may be little bit confusing
See the example
//declare a variable
$a='
allphpinterviewquestions
';
variable of variable means
$$a = 'test';
now $allphpinterviewquestions value is test
Thursday, April 1, 2010
initialize a variable in single quote and double quote
If the variable is declared in the double quote the variable will be parsed by php
if it is declared in single quote means it will not be parsed by
php
so initializing a variable a single quote is always better.
Also we can add variable inside the double quote
example
$a ="this is $var
allphpinterviewquestions
";
Older Posts
Home
Subscribe to:
Posts (Atom)
Search Interview Questions
Subscribe To
Posts
Atom
Posts
All Comments
Atom
All Comments
Related Links
PHP interview questions
mysql interview questions
apache websever interview questions
linux based questions for LAMP developers
Blog Archive
▼
2010
(57)
▼
April
(57)
difference between ksort and asort in php
asort arsort diffrerences
question about array sorts in php
extract domain name from the url using regular exp...
stristr trick questions
strstr trick questions
substr - related questions
captcha in php
Explain Static keyword in php
what is abstract class in php
what is inheritance in php?
What is array in php
How will you check whether a class already defined...
what are the frameworks available in PHP
Disadvantages of PHP?
Advantages of PHP
what are the magic methods in php
How to create objects for a class
what is an object in php
How to create a class in php
what is class in php
what is magic constants in php
How to escape from the remote file inclusion attack
How remote file inclusion works
What will happen if a attacker includes his file i...
what is remote file inclusion in php
what is php?
what is Variable variables
How to unset a reference
Question:what is References in php
List of Predefined Variables in php
difference between Reply-to and Return-path in mai...
Disadvantage of drupal
Advantages of Drupal
what is drupal?
Father of PHP
differences between GET and POST methods
differentiate __sleep and __wakeup?
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
What Is a Persistent Cookie?
Any idea about php6
number of days between two given dates using PHP?
What are the necessary security settings can be do...
what is cookies in php
How to disable a function in php
How to change php configuration using htaccess
what is session
what is maximum execution time php?
htmlentities and htmlspecialchars diff
initialize a variable in single quote and double q...
what is the output $$b
Difference between include_once and require_once i...
Difference between include and require in php
what is ternary conditional operator?
Identifying the number of parameters passed to a f...
How to define a constant in php
what is the difference between echo-print functions
Is top mnc companies recruiting php developers?
How is php job market
Labels
advanced
advantages
array
beginners
captcha
configuration
constants
differences
disadvantages
drupal
frameworks
frequently asked
functions
important questions
inhertitance
intermediate
oops
oops concept
security
simple interview questions
strings
substr
tips
tricks
variables
About Me
phpman
View my complete profile