php知识点汇总与解答_PHP操作员能力倾向问题与解答
php知識點匯總與解答
This section contains Aptitude Questions and Answers on PHP Operators.
本節(jié)包含有關PHP運算符的 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中使用以下哪種運算符?算術運算符
邏輯運算符
數(shù)組運算符
字符串運算符
選項:
A和B
C和D
A,B和C
A,B,C和D
正確答案:4
A,B,C和D
所有給定的選項都是PHP中使用的正確運算符類型。
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
垃圾價值
以上都不是
正確答案:2
81
上面的代碼將在網頁上打印“ 81” 。 因為**運算符用于指數(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)“ **”運算符屬于哪一類運算符?算術運算符
邏輯運算符
比較運算符
條件運算符
正確答案:1
算術運算符
**運算符屬于算術運算符。
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)以下哪個是PHP中的比較運算符?==
!=
===
<=>
選項:
A和B
C和D
A,B和C
A,B,C和D
正確答案:4
A,B,C和D
所有給定的選項都是比較運算符。
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)
錯誤
以上都不是
正確答案:1
布爾值(true)
上面的代碼將在網頁上打印bool(true) , <>運算符為“不等于”運算符。
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)
錯誤
以上都不是
正確答案:1
布爾值(true)
上面的代碼將在網頁上打印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)
錯誤
正確答案:2
整數(shù)(-1)
上面的代碼將在網頁上打印“ 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)以下哪個運算符在PHP中不可用?點(。)
=
。=
@
正確答案:4
@
@運算符在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)給定代碼段的正確輸出是什么?印度
垃圾價值
錯誤
以上都不是
正確答案:1
印度
上面的代碼將在網頁上打印“印度” 。
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)以下哪個運算符在PHP中被稱為空合并?<==>
===
??
?
正確答案:3
??
?? 運算符在PHP中被稱為空合并運算符。
翻譯自: https://www.includehelp.com/php/operators-aptitude-questions-and-answers.aspx
php知識點匯總與解答
總結
以上是生活随笔為你收集整理的php知识点汇总与解答_PHP操作员能力倾向问题与解答的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 密码学替代技术_替代技术及其类型| 密码
- 下一篇: vqa mcb_MCB的完整形式是什么?