Preguntas de práctica para el exámen de certificación de PHP

Hace unos dias lei sobre las preguntas que hacen en Yahoo para entrevistar a un desarrollador de PHP. Algunas de las preguntas son las siguientes: 1. Which of the following will not add john to the...
Hace unos dias lei sobre las preguntas que hacen en Yahoo para entrevistar a un desarrollador de PHP. Algunas de las preguntas son las siguientes:

1. Which of the following will not add john to the users array?

[code lang="php"]

$users[] = ‘john’;
array_add($users,’john’);
array_push($users,‘john’);
$users ||= ‘john’;

[/code]

2. What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these?

3. What would the following code print to the browser? Why?

[code lang="php"]

$num = 10;
function multiply(){
$num = $num * 10;
}
multiply();
echo $num;

[/code]

4. What is the difference between a reference and a regular variable? How do you pass by reference & why would you want to?

Despues de ver estas preguntas me acorde del exámen de prueba que trae la guia de certificación para PHP, las cuales quiero compartirles a ver que tal andan en sus conocimientos de PHP.

Practice Exam

  1. Which of the following strings are not valid modes for the fopen() function?
    A. a+b
    B. b+a
    C. at
    D. w
    E. x+
  2. Consider the following piece of code:
    [code lang="php"]
    $arr = array(3 => “First”, 2=> “Second“, 1=> “Third“);
    list (, $result) = $arr;
    [/code]After running it, the value of $result would be
    A. First
    B. Second
    C. Third
    D. This piece of code will not run, but fail with a parse error.
  3. In standard SQL-92, which of these situations do not require or cannot be handled
    through the use of an aggregate SQL function? (Choose 2).
    A. Calculating the sum of all the values in a column.
    B. Determining the minimum value in a result set.
    C. Grouping the results of a query by one or more fields.
    D. Calculating the sum of all values in a column and retrieving all the values of
    another column that is not part of an aggregate function or GROUP BY clause.
    E. Determining the mean average of a column in a group of rows.
  4. Multidimensional arrays can be sorted using the ______ function.
  5. When using the default session handler files for using sessions, PHP stores
    session information on the harddrive of the webserver.When are those session
    files cleaned up?

    A. PHP will delete the associated session file when session_destroy() is
    called from within a script.
    B. When the function session_cleanup() is called, PHP will iterate over all
    session files, and delete them if they exceeded the session timeout limit.
    C. When the function session_start() is called, PHP will iterate over all
    session files, and delete them if they exceeded the session timeout limit.
    D. When the function session_start() is called, PHP will sometimes iterate
    over all session files, and delete them if they exceeded the session timeout
    limit.
    E. Session files are never removed from the filesystem, you need to use an automated
    script (such as a cronjob) to do this.
  6. What is the order of parameters in the mail() function?
    A. subject, to address, extra headers, body
    B. to address, subject, extra headers, body
    C. to address, subject, body, extra headers
    D. subject, to address, body, extra headers
  7. Which of the following statements are correct? (Choose 3)
    A. sprintf() does not output the generated string.
    B. printf(“%2s%1s“, “ab“, “c“) outputs the string abc.
    C. vprintf() takes at least one parameter; the first parameter is the formatting
    string and the following parameters are the arguments for the ‘%’
    placeholders.
    D. printf(“%c“, “64“) will output @ and not 6.
    E. sprintf(“%3.4f“, $x) outputs more than 7 characters.
    F. number_format() inserts thousands of separators and decimal points different
    from (,) and (.) respectively, while printf() like functions always use
    (.) as decimal point.

Bueno estas son solo 7 de un total de 18 preguntas, para los que quieran el examen de práctica completo les dejo el archivo para descargarlo.

Descargar Archivo