Yahoo is said to be a PHP face questions with answers _php tips

Source: Internet
Author: User
Collected from the Internet, is said to be Yahoo's face test questions.
1. Which of the following won't add John to the users array?
1. $users [] = ' John ';
2. Array_add ($users, ' John '); Wrong
3. Array_push ($users, ' John ');
4. $users | | = ' John '; Wrong
2. What ' s The difference between sort (), Asort () and Ksort? Under what circumstances would you with each of these?
My An:sort ()-Sort asort ()-keep key value sorted Ksort ()-Sorted in key order Rsort ()-Reverse sort arsort ()-keep key value inverse sort krsort ()-Sort in reverse order of key
3. What would the following code print to the browser? Why?
$num = 10;
function Multiply ()
{
$num = $num * 10;
}
Multiply ();
Echo $num;
My an:10 because Var scope4. What is the difference between a reference and a regular variable? How does your pass by reference & why would your want to?
5. What functions can you add library code to the currently running script?
6. What is the difference between foo () & @foo ()?
7. How did you debug a PHP application?
8. What does = = do? What ' s a example of something that would give true for ' = = ', but not ' = = '?
9. How would your declare a class named "MyClass" with no methods or properties?
How would are you to create an object, which be an instance of "MyClass"?
How did you access and set properties of a class from within the class?
What is the difference between include & Include_once? Include & require?
What function would you with the redirect the browser to a new page?
1. Redir () 2. Header () 3. Location () 4. Redirect ()
My An:2
What function can you with to open a file for reading and writing?
1. Fget (); 2. File_open (); 3. fopen (); 4. Open_file (); my an:315. What ' s The difference between mysql_fetch_row () and mysql_fetch_array ()?
What does the following code do? Explain what ' s going on there.
$date = ' 08/26/2003 '; Print ereg_replace ([0-9]+)/([0-9]+)/([0-9]+), 2/1/3, $date); 17. Given a line of text $string, how would your write a regular expression to strip all the HTML tags from it?
What ' s The difference between the way PHP and Perl distinguish between arrays and hashes?
How can I/round the stateless nature of HTTP using PHP?
What does the GD library do?
Name a few ways to output (print) A blocks of HTML code in PHP?
is PHP better than Perl? –discuss.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.