SitePoint Sponsor

User Tag List

Results 1 to 22 of 22
  1. #1
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP online tests

    Hi guys

    Can anyone recommend a good website for online PHP tests for potential employees?

    Thanks in advance.

    Crabby

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Perform a search for php interview questions.

    For example, the first site from a search provides us with the following questions from http://www.techinterviews.com/php-in...estions-part-1

    1. What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
    2. Who is the father of PHP and explain the changes in PHP versions?
    3. How can we submit a form without a submit button?
    4. In how many ways we can retrieve the date in the result set of mysql using PHP?
    5. What is the difference between mysql_fetch_object and mysql_fetch_array?
    6. What is the difference between $message and $$message?
    7. How can we extract string ‘techinterviews.com ‘ from a string ‘http://www.techinterviews.com’ using regular expression of PHP?
    8. How can we create a database using PHP and mysql?
    9. What are the differences between require and include, include_once?
    10. Can we use include (”techinterviews.php”) two times in a PHP page “makeit.PHP”?
    11. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?
    12. Functions in IMAP, POP3 AND LDAP?
    13. How can I execute a PHP script using command line?
    14. Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
    15. Shopping cart online validation i.e. how can we configure Paypal, etc.?
    16. What is meant by nl2br()?
    17. Draw the architecture of Zend engine?
    18. What are the current versions of apache, PHP, and mysql?
    19. What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?
    20. How can we encrypt and decrypt a data present in a mysql table using mysql?
    21. How can we encrypt the username and password using PHP?
    22. What are the features and advantages of object-oriented programming?
    23. What are the differences between procedure-oriented languages and object-oriented languages?
    24. What is the use of friend function?
    25. What are the differences between public, private, protected, static, transient, final and volatile?
    26. What are the different types of errors in PHP?
    27. What is the functionality of the function strstr and stristr?
    28. What are the differences between PHP 3 and PHP 4 and PHP 5?
    29. How can we convert asp pages to PHP pages?
    30. What is the functionality of the function htmlentities?
    31. How can we get second of the current time using date function?
    32. How can we convert the time zones using PHP?
    33. What is meant by urlencode and urldecode?
    34. What is the difference between the functions unlink and unset?
    35. How can we register the variables into a session?
    36. How can we get the properties (size, type, width, height) of an image using PHP image functions?
    37. How can we get the browser properties using PHP?
    38. What is the maximum size of a file that can be uploaded using PHP and how can we change this?
    39. How can we increase the execution time of a PHP script?
    40. How can we take a backup of a mysql table and how can we restore it. ?
    41. How can we optimize or increase the speed of a mysql select query?
    42. How many ways can we get the value of current session id?
    43. How can we destroy the session, how can we unset the variable of a session?
    44. How can we destroy the cookie?
    45. How many ways we can pass the variable through the navigation between the pages?
    46. What is the difference between ereg_replace() and eregi_replace()?
    47. What are the different functions in sorting an array?
    48. How can we know the count/number of elements of an array?
    49. What is the PHP predefined variable that tells the What types of images that PHP supports?
    50. How can I know that a variable is a number or not using a JavaScript?
    51. List out some tools through which we can draw E-R diagrams for mysql.
    52. How can I retrieve values from one database server and store them in other database server using PHP?
    53. List out the predefined classes in PHP?
    54. How can I make a script that can be bilanguage (supports English, German)?
    55. What are the difference between abstract class and interface?
    56. How can we send mail using JavaScript?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are the differences between Get and post methods
    My favorite is "Can we use both methods simultaneously?".
    Most people fail to right answer

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Shrapnel_N5 View Post
    My favorite is "Can both methods be used simultaneously?".
    Most people fail to right answer
    That depends on how you define things.

    While you can pre-populate the querystring with some values when you use post, that might not count as "get" data because no data from a web form can be sent via get simultaneously with post.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The term "method" has only one definition.
    But poor PHP folks get confused by superglobal arrays names

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Shrapnel_N5 View Post
    The term "method" has only one definition.
    But poor PHP folks get confused by superglobal arrays names
    Please carry on. What is a good explanation for the question.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your replies guys.

    We could quite easily provide a list of questions, but we're after a resource where they could complete the test from home, so ideally there would need to be a timer for each question and we could then look at how they scored.

    Just wondering whether any employers could recommend this type of system, could always develop it ourselves, but just don't have the time!

    Thanks again for your replies.

    Crabby

  8. #8
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Methods cannot be used simultaneously, that's all.
    Because we have only one definition for the things.

    Also there are no thing called "get data" actually. It is query string data to be correct.
    And it is just PHP creators fail, to name $_GET array this way, that confuses many developers.

  9. #9
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by crabby80 View Post
    We could quite easily provide a list of questions, but we're after a resource where they could complete the test from home, so ideally there would need to be a timer for each question and we could then look at how they scored.
    Currently some large internet hosts are down, however a search for timed php quiz does give us some promising sites. For example:

    PHP Quiz - free online quiz, test and trivia
    http://www.ex-designz.net/test_page.asp?tid=30

    Such sites would give you insight as to how such things are handled, from which you may be inspired to create your own.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  10. #10
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Shrapnel_N5 View Post
    The term "method" has only one definition.
    Aha, so we were thinking of different definitions after all.
    I was thinking of ways that users can submit them, whereas you are thinking of ways that PHP can access them.

    Both are valid, and have different answers.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  11. #11
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Method has only one definition. No thinking required.
    That's why it is good question.
    It requires understanding of things.
    Much like cookies does. Another seems-to-be-simple question: What is cookie?

  12. #12
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Crabby, you can just accept ZCE certificates as passed tests.

  13. #13
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    A cookie is just data that is stored against a (sub)domain.
    The term originated from the process of manufacturing.

    If we're not going to help the OP with his question though, we should take this off-thread.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  14. #14
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again for your replies

    I just took a test at the link you provided pmw57

    My answer's right too isn't it??? 8>)

    2) PHP comments for a single line have the following syntax:
    a) /* comments /*
    b) # - correct answer
    c) (your answer) //
    d) ::

  15. #15
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Something that I have seen before that works really effective for the presentation, is to place to the left of the alpha bullets a green tick mark or a red cross.

    The answer can use a different color for correct line, but also should indicate in a color-free manner the right answer, with a tick to the right of it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  16. #16
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are some other mistakes too.

    I can't believe you're looking for well-cared tests for free, don't you?

  17. #17
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by crabby80 View Post
    My answer's right too isn't it??? 8>)

    2) PHP comments for a single line have the following syntax:
    a) /* comments /*
    b) # - correct answer
    c) (your answer) //
    d) ::
    Ahh, that's a nice trap. The test creator must have been in a snotty mood that day.

    Code php:
    <?php
        echo 'This is a test'; // This is a one-line c++ style comment
        /* This is a multi line comment
           yet another line of comment */
        echo 'This is yet another test';
        echo 'One Final Test'; # This is a one-line shell-style comment
    ?>
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  18. #18
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't mention 'Free'?

    If there's a subscription cost then so be it, I was just wondering if anyone could recommend anything they've used??

  19. #19
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol, actually I never knew you could use a hash for a comment...8>)

  20. #20
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    3 and 22 also has wrong answers.
    As for cookie, it can be not stored at all, especially answer's one.
    Cookie is an HTTP header, nothing else.

  21. #21
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep I got them wrong aswell??

  22. #22
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    A lot of these tests I've seen pasted in here are complete rubbish. Why do you need to know who created PHP and what the difference between versions are to use it? A lot of online tests only seem to test specifics in knowledge rather than general concepts. You don't need to memorise every function and its arguments in order to use a language, that's what documentation is for! A sound understanding of syntax, programming concepts and what makes good/maintainable code is far more important I think.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •