aptitude_PHP Numbers Aptitude问题与解答
aptitude
This section contains Aptitude Questions and Answers on PHP Numbers.
本節包含有關PHP數字的能力問題。
1) PHP supports automatic type conversion?Yes
No
Correct answer: 1
Yes
Yes, PHP supports automatic type conversion.
1)PHP是否支持自動類型轉換?是
沒有
 正確答案:1 
 是 
是的,PHP支持自動類型轉換。
2) Which of the following function is used to check a variable contains an integer number?is_int()
isint()
isinteger()
None of the above
Correct answer: 1
is_int()
The is_int() function is used to check a variable contains an integer number.
2)以下哪個函數用于檢查變量是否包含整數?is_int()
isint()
isinteger()
以上都不是
 正確答案:1 
 is_int() 
is_int()函數用于檢查包含整數的變量。
3) What is the correct output of the given code snippets? <?php$num = 1234;var_dump(is_integer($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
3)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
4) What is the correct output of the given code snippets? <?php$num = 1234;var_dump(is_integer($num));$num = 12.34;var_dump(is_integer($num)); ?>bool(true)
bool(false)
bool(true) bool(false)
Error
Correct answer: 3
bool(true) bool(false)
The above code will print "bool(true) bool(false)" on the webpage.
4)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
bool(true)bool(false)
錯誤
 正確答案:3 
 bool(true)bool(false) 
上面的代碼將在網頁上打印“ bool(true)bool(false)” 。
5) Which of the following function is not available in PHP?is_int()
is_integer()
is_long()
is_short()
Correct answer: 4
is_short()
The is_short() function is not available in PHP.
5)以下哪個功能在PHP中不可用?is_int()
is_integer()
長()
是短()
 正確答案:4 
 是短() 
is_short()函數在PHP中不可用。
6) Which of the following function is not available in PHP?is_float()
is_double()
is_longdouble()
is_integer()
Correct answer: 3
is_longdouble()
The is_longdouble() function is not available in PHP.
6)以下哪個功能在PHP中不可用?is_float()
is_double()
is_longdouble()
is_integer()
 正確答案:3 
 is_longdouble() 
is_longdouble()函數在PHP中不可用。
7) What is the correct output of the given code snippets? <?php$num = 12.34;var_dump(is_double($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
7)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
8) What is the correct output of the given code snippets? <?php$num = 12.34F;var_dump(is_double($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 3
Error
The above code will generate an error.
8)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:3 
 錯誤 
上面的代碼將產生錯誤。
9) What is the correct output of the given code snippets? <?php$num = 12.34;var_dump(is_float($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
9)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
10) The is_float() function is alias of is_double() function in PHP? <?phpdefine("COUNTRIES", ["INDIA","AUSTRALIA","USA"]);echo COUNTRY[1]; ?>Yes
No
Correct answer: 1
Yes
Yes, the is_float() function is alias of is_double() function in PHP.
10)is_float()函數是PHP中is_double()函數的別名嗎?是
沒有
 正確答案:1 
 是 
是的, is_float()函數是PHP中is_double()函數的別名。
11) Which of the following functions are used to check numbers infinity in PHP?is_finite()
is_infinite()
isfinite()
isinfinite()
Options:
Only A
Only B
A and B
C and D
Correct answer: 3
A and B
The is_finite() and is_infinite() functions are used to check numbers infinity in PHP.
11)以下哪個函數用于檢查PHP中的數字無窮大?is_finite()
is_infinite()
isfinite()
isinfinite()
選項:
只有一個
只有B
A和B
C和D
 正確答案:3 
 A和B 
is_finite()和is_infinite()函數用于檢查PHP中的數字無窮大。
12) What is the correct output of the given code snippets? <?php$num = 1234;var_dump(is_nan($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 2
bool(false)
The above code will print "bool(false)" on the webpage.
12)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:2 
 布爾值(false) 
上面的代碼將在網頁上打印“ bool(false)” 。
13) What is the correct output of the given code snippets? <?php$num = "ABC";var_dump(is_numeric($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 2
bool(false)
The above code will print "bool(false)" on the webpage.
13)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:2 
 布爾值(false) 
上面的代碼將在網頁上打印“ bool(false)” 。
14) What is the correct output of the given code snippets? <?php$num = "123";var_dump(is_numeric($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
14)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
15) What is the correct output of the given code snippets? <?php$num = "123.45";var_dump(is_numeric($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
15)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
16) Which of the following are used for type conversion in PHP?int
integer
intval
int_val
Options:
A and B
A and C
A, B, and C
A, B, C, and D
Correct answer: 3
A, B, and C
The int, integer, and intval are used for type conversion in PHP.
16)以下哪項用于PHP中的類型轉換?整型
整數
間隔
int_val
選項:
A和B
A和C
A,B和C
A,B,C和D
 正確答案:3 
 A,B和C 
int , integer和intval用于PHP中的類型轉換。
17) What is the correct output of the given code snippets? <?php$num1 = "123"; $num2 = int($num1);echo $num2; ?>123
"123"
Error
None of the above
Correct answer: 3
Error
The above code will generate a syntax error.
17)給定代碼段的正確輸出是什么?123
“ 123”
錯誤
以上都不是
 正確答案:3 
 錯誤 
上面的代碼將生成語法錯誤。
18) What is the correct output of the given code snippets? <?php$num1 = "123";$num2 = intval($num1);echo $num2; ?>123
"123"
Error
None of the above
Correct answer: 1
123
The above code will print "123" on the webpage.
18)給定代碼段的正確輸出是什么?123
“ 123”
錯誤
以上都不是
 正確答案:1 
 123 
上面的代碼將在網頁上打印“ 123”。
19) What is the correct output of the given code snippets? <?php$num1 = "123";$num2 = integer($num1);echo $num2; ?>123
"123"
Error
None of the above
Correct answer: 3
Error
The above code will generate a syntax error.
19)給定代碼段的正確輸出是什么?123
“ 123”
錯誤
以上都不是
 正確答案:3 
 錯誤 
上面的代碼將生成語法錯誤。
20) What is the correct output of the given code snippets? <?php$num1 = "123";$num2 = (integer)$num1;echo $num2; ?>123
"123"
Error
None of the above
Correct answer: 1
123
The above code will print "123" on the webpage.
20)給定代碼段的正確輸出是什么?123
“ 123”
錯誤
以上都不是
 正確答案:1 
 123 
上面的代碼將在網頁上打印“ 123” 。
21) What is the correct output of the given code snippets? <?php$num1 = "ABC";$num2 = (int)$num1;echo $num2; ?>123
0
Error
None of the above
Correct answer: 2
0
The above code will print "0" on the webpage.
21)給定代碼段的正確輸出是什么?123
0
錯誤
以上都不是
 正確答案:2 
 0 
上面的代碼將在網頁上打印“ 0” 。
22) What is the correct output of the given code snippets? <?php$num1 = "ABC";$num2 = intval($num1);echo $num2; ?>123
0
Error
None of the above
Correct answer: 2
0
The above code will print "0" on the webpage.
22)給定代碼段的正確輸出是什么?123
0
錯誤
以上都不是
 正確答案:2 
 0 
上面的代碼將在網頁上打印“ 0” 。
23) What is the correct output of the given code snippets? <?php$num = "123" + 45;var_dump(isnumeric($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 3
Error
The above code will generate a syntax error.
23)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:3 
 錯誤 
上面的代碼將生成語法錯誤。
24) What is the correct output of the given code snippets? <?php$num = "123" + 45;var_dump(is_numeric($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 1
bool(true)
The above code will print "bool(true)" on the webpage.
24)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:1 
 布爾值(true) 
上面的代碼將在網頁上打印“ bool(true)” 。
25) What is the correct output of the given code snippets? <?php$num = "ABC";var_dump(is_nan($num)); ?>bool(true)
bool(false)
Error
None of the above
Correct answer: 4
None of the above
The above code will print "NULL" on the webpage.
25)給定代碼段的正確輸出是什么?布爾值(true)
布爾值(false)
錯誤
以上都不是
 正確答案:4 
 以上都不是 
上面的代碼將在網頁上顯示“ NULL” 。
翻譯自: https://www.includehelp.com/php/numbers-aptitude-questions-and-answers.aspx
aptitude
總結
以上是生活随笔為你收集整理的aptitude_PHP Numbers Aptitude问题与解答的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: bpl开发模式_BPL的完整形式是什么?
- 下一篇: ajax的模式_AJAX的完整形式是什么
