Home >Backend Development >PHP Tutorial >PHP programmer interview questions (yahoo company)
4. Reference variables and What is the difference between ordinary variables? How to pass value by reference? Under what circumstances would this be done? 5. Which functions can be used to add library code to the current code? 6. What is the difference between foo() and @foo()? 7. How do you debug your PHP program? 8. What is the operator ===? Please give an example of when using == will result in true, but using === will result in false. 9. How to declare a class named "myclass" without methods and attributes? 10. How to instantiate an object named "myclass"? 11. How do you access and set the attributes of a class? 12. What are the differences between include and include_once, and include and require? 13. Which of the following functions can redirect the browser to a new page? 1.redir() 2. header() 3. location() 4. redirect() 14. Which of the following functions can open a file for reading and writing? 1. fget(); 2. file_open(); 3. fopen(); 4. open_file(); 15. What is the difference between mysql_fetch_row() and mysql_fetch_array? 16. What does the following code perform? Explain what happens at each step. $date=’08/26/2003’; print ereg_replace(“([0-9]+)/([0-9]+)/([0-9]+)”,\2/\1/\3,$date); 17. Given a string variable $string, please write a regular expression to remove the html tag. 18. What are the differences between arrays and hashes in PHP and Perl? 19. How to avoid the connectionless feature of PHP in PHP? 20. What is the GD library used for? 21. Point out some ways to enter a piece of html code in PHP. 22. Is PHP better than Peral? (Discussion) |