日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

aptitude_PHP Numbers Aptitude问题与解答

發布時間:2025/3/11 php 54 豆豆
生活随笔 收集整理的這篇文章主要介紹了 aptitude_PHP Numbers Aptitude问题与解答 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

aptitude

This section contains Aptitude Questions and Answers on PHP Numbers.

本節包含有關PHP數字的能力問題。

1) PHP supports automatic type conversion?
  • Yes

  • No

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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()

  • Answer & Explanation

    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()

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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

  • Answer & Explanation

    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问题与解答的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。