1. What is the return value of <?=date(strtotime("18/0/2006"),"d");?> 2. What does "PHP" mean? 3. what is the return value of @mysql_query("no valid sql") 4. show an example of ternary operator 5. any idea why subversion is used ? 6. which API helps you to find out methods and properties of any class? 7. can you tell what pattern is used in the following code? class a { private static $b; static function c() { self::$b=!self::$b? new a(): self::$b; return self::$b; } } 8. Please name some libraries used as data access layers for PHP 9. if mail() function is not working, can you identify possible reasons what is wrong? 10. Any idea how a web application can share data with another web application? 11. Can you extract dates from MySQL timestamp field without using PHP? 12. if $str = "abcd" and $str[2]= c then what is the output of <?=count($str)?> 13. What is the pattern (regular expression, PCRE) used to extract bold text from the following string? [Ӓࢥ̈᧡ Hello Ӓࢥ̈᧡ World] 14. can you name some popular template engines for PHP 15. Any idea about output buffering? 16. Name your favorite PHP sites. Where from you take helps? 17. Are you familiar with PEAR, CURL and PECL? Why they are used? 18. Any idea about caching? Can you name any popular output caching solution for PHP? 19. What library in PHP is used for image processing? 20. If CURL is not enabled, can you use any alternate solution? I would be more than happy i get answer form DP members..
These question seem like the sort you would get in an interview, not for homework (though the first few easy questions seem to hint otherwise, then again, they could be to identify no-go candidates). Anyway, Google will help you find most of the answers, how about you just let us know which ones you could not find the answer to and we'll give you pointers.
Actually I am test+ing the Skills of DP php programmer's so on one can answers for a single question.. really funny ! Print "tahnks" lol......
1. What is the return value of <?=date(strtotime("18/0/2006"),"d");?> It produces an error because it's incorrect usage of the function 2. What does "PHP" mean? hypertext preprocessor 3. what is the return value of @mysql_query("no valid sql") nothing, errors are supressed by @ 4. show an example of ternary operator condition ? if condition true : elseif condition false ; 5. any idea why subversion is used ? not really, what does that have to do with php 6. which API helps you to find out methods and properties of any class? reflection 7. can you tell what pattern is used in the following code? question 5, or recursion, you should use the correct words in your questions then they would be easier to understand class a { private static $b; static function c() { self::$b=!self::$b? new a(): self::$b; return self::$b; } } 8. Please name some libraries used as data access layers for PHP not really sure what you mean by that, could have several meanings 9. if mail() function is not working, can you identify possible reasons what is wrong? not from php you can't, php doesn't return an actual result when mail is called, it just returns true if the message is added to the queue 10. Any idea how a web application can share data with another web application? database, luck, ajax, pixies 11. Can you extract dates from MySQL timestamp field without using PHP? if you're not using php, then how are you interacting with mysql, and moreover where are you extracting the date too ? thats another stupid question 12. if $str = "abcd" and $str[2]= c then what is the output of <?=count($str)?> 4 and you made another mistake, it's $str{2} 13. What is the pattern (regular expression, PCRE) used to extract bold text from the following string? these characters aren't acsii characters, wtf [Ӓࢥ̈᧡ Hello Ӓࢥ̈᧡ World] 14. can you name some popular template engines for PHP smarty, no others are worth using 15. Any idea about output buffering? yes thanks 16. Name your favorite PHP sites. Where from you take helps? no where, I don't need it 17. Are you familiar with PEAR, CURL and PECL? Why they are used? they are three entirely different things, pear and pecl are software extensions of the php code, pecl is c/c++ and pear is interpreted php, curl is a seperate extension - it gives access to the libcurl library from php 18. Any idea about caching? Can you name any popular output caching solution for PHP? mmcache, eAccelerator 19. What library in PHP is used for image processing? gd, imagemagik 20. If CURL is not enabled, can you use any alternate solution? fsock's | socks | fopen Some of those questions are too dumb to have been set by a teacher of any sort.
oh yeah, so they do, it's still a stupid question it doesn't matter what the value of any of the characters are, I find it sooo hard to believe that anyone who is supposed to be a teacher set these questions.
I meant it doesn't return anything, which is the same as false, and there is no output because errors are supressed.
- $str[int] is not ideal but works - $str is a string, not an array or characters, so count($str) is always 1 This is one question that makes these questions seem like interview ones. This is not so much to do with PHP but experienced developers should know this, especially if they work in a group and/or work on a large distributed script. Data access provides interaction between application and data source without using data source specific functions such as mysql_query, instead it uses abstraction. For example, PDO in PHP5, or ADODB, a common 3rd party library. I think you are still answering these as HW questions, pretend it is an interview. In this case, I would point out common pitfalls, mail() disabled by server admin, no internet connectivity, malformed email address... I'd be looking for things such as web services before pixies Not really. Think about using MySQL directly, e.g. via a console, does mysql> MY_QUERY... look familiar?