hai all,
Anybody know the PHP interview questions asked in Photon Infotech?
Sample question :
1. What is the uses and syntax of UCFIRST() function?
- ucfirst -- Make a string's first character uppercase
- Example :
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
2. How to get the current working browser using php code?
(i) Method 1: $_SERVER['HTTP_USER_AGENT']
Example :
if (substr_count(strtolower($_SERVER['HTTP_USER_AGENT']),"firefox"))/* Firefox browser*/
echo "My name's Firefox";
else if (substr_count(strtolower($_SERVER['HTTP_USER_AGENT']),"opera")) /* Opera browser */
echo "My name's Opera";
else if (substr_count(strtolower($_SERVER['HTTP_USER_AGENT']),"msie")) /* IE browser */
echo "My name's IE ";
else if (substr_count(strtolower($_SERVER['HTTP_USER_AGENT']),"safari")) /* Safari browser */
echo "My name's Safari";
else
echo "I don't know my name ";
?>
(ii) Method 2
- get_browser() built-in function in php
- get_browser -- Tells what the user's browser is capable of
- Example :
echo $_SERVER['HTTP_USER_AGENT'] . "\n";
$browser = get_browser();
foreach ($browser as $name => $value) {
echo "$name $value
\n";
}
?>
3. Worked projects related questions
4. Most of the question asked in php.ini setting
Example :
1. What is the maximum file size to upload by default?
- 2MB
2. What is the minimum session expiry time by default?
- session.cache_expire is 180 seconds
3. Necessity of md5 and its purpose?
4. Difference b/w PHP 4 and PHP 5?
5. PHP INI?
6. Different types of Payment gate way?
7. Different types of PHP Frame Works?
Subscribe to:
Post Comments (Atom)
Popular Posts
-
1. How old PHP language is? - PHP began in 1994, so 14 years old. 2. What are different names of PHP? - PHP originally stood for Persona...
-
HTML: a. HTML is a markup language that is used to build static (non interactive and nonanimated) webpages. b. HTML is Case-Insensitive. So...
-
A payment gateway is an e-commerce application service provider service that authorizes payments for e-businesses, online retailers, bricks...
-
Note : This is not a perfect sort order, we have just displaying the list of PHP companies. 1. Photon Infotech No. 2/102, Arvind IT Park (N...
-
- count() -- Count elements in a variable - syntax for count() [int count ( mixed var [, int mode])] - If the optional mode parameter is set...
-
Hai all, Simple show hide sample using Show/Hide? Simple Show/Hide code
-
Sharing PHP, MySQL, Javascript, CSS Knowledge, We can share our PHP knowledge on the basis of PHP versioning, Javascript, AJAX, Stylesheet, ...
-
Use the below code and you can get the exact value in php as us saw in browser. Code: $encode_data = iconv('UTF-8', 'windows-125...
-
Download and Enjoy!
-
A hyperlink is a text or a image that you can click on, and move from one page to another web page. Syntax: < a href= "web pag...
2 comments:
Hi
I read this post 2 times. It is very useful.
Pls try to keep posting.
Let me show other source that may be good for community.
Source: Sample interview questions
Best regards
Jonathan.
any one find the job in php and web designing in Moahli...........
contact us
send me ur resume
rashma.kumari@bhanguz.com
hr@bhanguz.com
Post a Comment