Deck 17: PHP Array Functions and Basics
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/18
Play
Full screen (f)
Deck 17: PHP Array Functions and Basics
1
What function computes the difference of arrays?
A)array_diff
B)diff_array
C)arrays_diff
D)diff_arrays
A)array_diff
B)diff_array
C)arrays_diff
D)diff_arrays
array_diff
2
What functions count elements in an array?
A)Count
B)Size
C)Array_Count
D)Count_array
A)Count
B)Size
C)Array_Count
D)Count_array
Count
3
There are three different kind of arrays:
A)Numeric array, String array, Multidimensional array
B)Numeric array, Associative array, Dimensional array
C)Numeric array, Associative array, Multidimensional array
D)Const array, Associative array, Multidimensional array
A)Numeric array, String array, Multidimensional array
B)Numeric array, Associative array, Dimensional array
C)Numeric array, Associative array, Multidimensional array
D)Const array, Associative array, Multidimensional array
Numeric array, Associative array, Multidimensional array
4
Which array function checks if the specified key exists in the array
A)array_key_exist()
B)array_key_exists()
C)array_keys_exists()
D)arrays_key_exists()
A)array_key_exist()
B)array_key_exists()
C)array_keys_exists()
D)arrays_key_exists()
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
5
Which of the following DBMSs do not have a native PHP extension?
A)MySQL
B)IBM DB/2
C)Microsoft SQL Server
D)None of the above
A)MySQL
B)IBM DB/2
C)Microsoft SQL Server
D)None of the above
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
6
In PHP in order to access MySQL database you will use:
A)mysqlconnect() function
B)mysql-connect() function
C)mysql_connect() function
D)sql_connect() function
A)mysqlconnect() function
B)mysql-connect() function
C)mysql_connect() function
D)sql_connect() function
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
7
PHP files have a default file extension of..
A).html
B).xml
C).php
D).ph
A).html
B).xml
C).php
D).ph
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the following is/are a PHP code editor?
i. Notepad
ii. Notepad++
iii. Adobe Dreamweaver
iv. PDT
A)Only iv)
B)Only iii)
C)i), ii) and iii)
D)All of the above
i. Notepad
ii. Notepad++
iii. Adobe Dreamweaver
iv. PDT
A)Only iv)
B)Only iii)
C)i), ii) and iii)
D)All of the above
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
9
Which version of PHP introduced Try/catch Exception?
A)PHP 4
B)PHP 5
C)PHP 5.3
D)PHP 6
A)PHP 4
B)PHP 5
C)PHP 5.3
D)PHP 6
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
10
We can use ___ to comment a single line?
i. /?
ii. //
iii. #
iv. /* */
A)Only ii)
B)i), iii) and iv)
C)ii), iii) and iv)
D)Both ii) and iv)
i. /?
ii. //
iii. #
iv. /* */
A)Only ii)
B)i), iii) and iv)
C)ii), iii) and iv)
D)Both ii) and iv)
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the below statements is equivalent to $add += $add ?
A)$add = $add
B)$add = $add +$add
C)$add = $add + 1
D)$add = $add + $add + 1
A)$add = $add
B)$add = $add +$add
C)$add = $add + 1
D)$add = $add + $add + 1
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the conditional statements is/are supported by PHP?
i. if statements
ii. if-else statements
iii. if-elseif statements
iv. switch statements
A)Only i)
B)i), ii) and iv)
C)ii), iii) and iv)
D)All of the above
i. if statements
ii. if-else statements
iii. if-elseif statements
iv. switch statements
A)Only i)
B)i), ii) and iv)
C)ii), iii) and iv)
D)All of the above
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the looping statements is/are supported by PHP?
i. for loop
ii. while loop
iii. do-while loop
iv. foreach loop
A)i) and ii)
B)i), ii) and iii)
C)All of the above
D)None of the above
i. for loop
ii. while loop
iii. do-while loop
iv. foreach loop
A)i) and ii)
B)i), ii) and iii)
C)All of the above
D)None of the above
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
14
If $a = 12 what will be returned when ($a == 12)? 5: 1 is executed?
A)12
B)1
C)Error
D)5
A)12
B)1
C)Error
D)5
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
15
Who is the father of PHP?
A)Rasmus Lerdorf
B)Willam Makepiece
C)Drek Kolkevi
D)List Barely
A)Rasmus Lerdorf
B)Willam Makepiece
C)Drek Kolkevi
D)List Barely
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
16
What will be the output of the following php code?
<?php $num = "1"; $num1 = "2"; print $num+$num1; ?>
A)3
B)1+2
C)Error
D)12
<?php $num = "1"; $num1 = "2"; print $num+$num1; ?>
A)3
B)1+2
C)Error
D)12
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
17
Which of following variables can be assigned a value to it?
i. $3hello
ii. $_hello
iii. $this
iv. $This
A)All of the above
B)Only ii)
C)ii), iii) and iv)
D)ii) and iv)
i. $3hello
ii. $_hello
iii. $this
iv. $This
A)All of the above
B)Only ii)
C)ii), iii) and iv)
D)ii) and iv)
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck
18
What will be the output of the following PHP code?
<?php $a = "clue"; $a .= "get"; echo "$a"; ?>
A)get
B)true
C)false
D)clueget
<?php $a = "clue"; $a .= "get"; echo "$a"; ?>
A)get
B)true
C)false
D)clueget
Unlock Deck
Unlock for access to all 18 flashcards in this deck.
Unlock Deck
k this deck