php知识点汇总与解答_PHP操作员能力倾向问题与解答
php知識(shí)點(diǎn)匯總與解答
This section contains Aptitude Questions and Answers on PHP Operators.
本節(jié)包含有關(guān)PHP運(yùn)算符的 Aptitude問答。
1) Which of the following types of operators are used in PHP?Arithmetic Operators
Logical Operators
Array Operators
String Operators
Options:
A and B
C and D
A, B, and C
A, B, C, and D
Correct answer: 4
A, B, C, and D
All given options are correct types of operators are used in PHP.
1)PHP中使用以下哪種運(yùn)算符?算術(shù)運(yùn)算符
邏輯運(yùn)算符
數(shù)組運(yùn)算符
字符串運(yùn)算符
選項(xiàng):
A和B
C和D
A,B和C
A,B,C和D
正確答案:4
A,B,C和D
所有給定的選項(xiàng)都是PHP中使用的正確運(yùn)算符類型。
2) What is the correct output of the given code snippets? <?php$NUM1 = 3; $NUM2 = 4;$NUM3 = $NUM1 ** $NUM2;echo $NUM3; ?>12
81
Garbage value
None of the above
Correct answer: 2
81
The above code will print "81" on the webpage. Because ** operator is used for exponential.
2)給定代碼段的正確輸出是什么?12
81
垃圾價(jià)值
以上都不是
正確答案:2
81
上面的代碼將在網(wǎng)頁上打印“ 81” 。 因?yàn)?*運(yùn)算符用于指數(shù)。
3) The "**" operator belongs to which category of operators?Arithmetic operator
Logical operator
Comparison operator
Conditional operator
Correct answer: 1
Arithmetic operator
The ** operator belongs to arithmetic operators.
3)“ **”運(yùn)算符屬于哪一類運(yùn)算符?算術(shù)運(yùn)算符
邏輯運(yùn)算符
比較運(yùn)算符
條件運(yùn)算符
正確答案:1
算術(shù)運(yùn)算符
**運(yùn)算符屬于算術(shù)運(yùn)算符。
4) Which of the following are comparison operators in PHP?==
!=
===
< = >
Options:
A and B
C and D
A, B, and C
A, B, C, and D
Correct answer: 4
A, B, C, and D
All the given options are comparison operators.
4)以下哪個(gè)是PHP中的比較運(yùn)算符?==
!=
===
<=>
選項(xiàng):
A和B
C和D
A,B和C
A,B,C和D
正確答案:4
A,B,C和D
所有給定的選項(xiàng)都是比較運(yùn)算符。
5) What is the correct output of given code snippets? <?php$NUM1 = 3; $NUM2 = 4;var_dump($NUM1<>$NUM2); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print bool(true) on the webpage, the <> operator is "not equal to" operator.
5)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯(cuò)誤
以上都不是
正確答案:1
布爾值(true)
上面的代碼將在網(wǎng)頁上打印bool(true) , <>運(yùn)算符為“不等于”運(yùn)算符。
6) What is the correct output of given code snippets? <?php$NUM1 = 3; $NUM2 = 4;var_dump($NUM1!==$NUM2); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print bool(true) on the webpage.
6)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯(cuò)誤
以上都不是
正確答案:1
布爾值(true)
上面的代碼將在網(wǎng)頁上打印bool(true) 。
7) What is the correct output of given code snippets? <?php$NUM1 = 3; $NUM2 = 4;var_dump($NUM1<=>$NUM2); ?>int(0)
int(-1)
int(1)
Error
Correct answer: 2
int(-1)
The above code will print "int(-1)" on the webpage.
7)給定代碼段的正確輸出是什么?整數(shù)(0)
整數(shù)(-1)
整數(shù)(1)
錯(cuò)誤
正確答案:2
整數(shù)(-1)
上面的代碼將在網(wǎng)頁上打印“ int(-1)” 。
8) Which of the following operator is not available in PHP? <?php $num = "Hello";var_dump($num); ?>Dot (.)
=
.=
@
Correct answer: 4
@
The @ operator is not available in PHP.
8)以下哪個(gè)運(yùn)算符在PHP中不可用?點(diǎn)(。)
=
。=
@
正確答案:4
@
@運(yùn)算符在PHP中不可用。
9) What is the correct output of given code snippets? <?phpecho $country = $country ?? "india"; ?>india
garbage value
Error
None of the above
Correct answer: 1
india
The above code will print the "india" on the webpage.
9)給定代碼段的正確輸出是什么?印度
垃圾價(jià)值
錯(cuò)誤
以上都不是
正確答案:1
印度
上面的代碼將在網(wǎng)頁上打印“印度” 。
10) Which of the following operator is known as null coalescing in PHP?< == >
===
??
?
Correct answer: 3
??
The ?? operator is known as the null coalescing operator in PHP.
10)以下哪個(gè)運(yùn)算符在PHP中被稱為空合并?<==>
===
??
?
正確答案:3
??
?? 運(yùn)算符在PHP中被稱為空合并運(yùn)算符。
翻譯自: https://www.includehelp.com/php/operators-aptitude-questions-and-answers.aspx
php知識(shí)點(diǎn)匯總與解答
總結(jié)
以上是生活随笔為你收集整理的php知识点汇总与解答_PHP操作员能力倾向问题与解答的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 密码学替代技术_替代技术及其类型| 密码
- 下一篇: php发展历,PHP的发展历程