This article will share with you a new summary of multiple-choice PHP interview questions. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Related recommendations: "PHP interview questions, the latest summary of application questions""PHP interview questions, the latest summary of conceptual questions""PHP interview The latest summary of questions and answers》
A.EmptyB.true C.false D.FALSE
echo function_exists('print');
Analysis: Because print is a language structure, function_exists() returns false; echo false is empty.
A.array B.evalC.eachD.list
Analysis: array, eval, and list are language structures, and each is a function.
A.ord(65)B.chr(65)C.65 '' D.'' 65
return ? == 'A';
Analysis: ord('A') is converted to a number, chr(65) is converted to a character.
A.hello B. Empty C. ErrorD.hellohello
$a[bar] = 'hello'; echo $a[bar]; echo $a['bar'];
Analysis: The subscript bar can be recognized without quotation marks, but it is recommended to add quotation marks.
$arr = ['name'=>'banana'];
A.echo "{$res['name']}";
B.echo "$res['name' ]";
C.echo "{$res[name]}";
D.echo " $res[name]”;
Analysis: Within double quotes, if the array subscript is a string, single quotes cannot be added unless {} is added.
A.E_WARNING
B.E_USER_ERROR
C.E_PARSE
D.E_NOTICE
Analysis:
E_ERROR | Fatal runtime error. This type of error is generally an unrecoverable situation, such as a problem caused by memory allocation. The consequence is that the script terminates and does not continue to run. |
E_WARNING | Runtime warning. Only a prompt message is given, but the script does not terminate. |
E_PARSE | Compile-time syntax parsing error. Parsing errors are generated only by the parser. |
E_NOTICE | Runtime notification. Indicates that the script encounters a situation that may appear as an error, but there may also be similar notifications in scripts that can run normally. |
E_USER_ERROR | User-generated error message. Similar to E_ERROR, but generated by the user using the PHP function trigger_error() in the code. |
A.E_WARNING
B.E_USER_ERROR
C.E_PARSE
D.E_NOTICE
This article was first published on the LearnKu.com website.
The above is the detailed content of The latest summary of multiple choice questions for PHP interview questions. For more information, please follow other related articles on the PHP Chinese website!