PHP - Fill in the blanks (Set 2)
- abhijitsathe
- Sep 7
- 2 min read
Q.1) ___________ function converts a string to all uppercase.
Answer - strtoupper()
Q.2) String values in PHP must be enclosed within ________
Answer :- double quotes or single quotes
Q.3) _____________ function removes whitespace and other predefined characters from the left side of a string.
Answer:- ltrim()
Q.4) The _____________ function is used used to get the reverse version of any string
Answer:- strrev()
Q.5) The baseconvert() function is used to convert a __________
Answer:- String argument into numbers.
Q.6) The ______________ function returns square root of given argument.
Answer:- sqrt()
Q.7) ______________ function rounds the fractions up while __________ function rounds the fractions down.
Answer:- ceil(), floor()
Q.8) By default, the index of array in php starts from ______
Answer:- 0
Q.9) An array which contains single or multiple arrays within it and can be accessed via multiple indices is_____________
Answer:- multi-dimensional array
Q.10) ____________ construct helps to initialize an array, building it from its arguments.
Answer:- array()
Q.11) The array with a string index where instead of linear storage, each value can be assigned a specific key is_________
Answer:- Associative array
Q.12) The indexed arrays used to store any type of elements have default index starting at _________
Answer:- Zero
Q.13) In array traversal, the ____________ function is invoked to restore the array pointer to the first element in the array.
Answer:- Reset
Q.14) The indexed arrays can be used to store any type of elements, but an index is always a _________.
Answer:- number
Q.15) __________function merges two arrays into one array.
Answer:- Array_merge
Q.16) ________function displays structured information about variables including its type and value.
Answer:- var_dump( )
Q.17) ____________ function takes an array as input and split that array into smaller chunks of the given size.
Answer:- array_chunk()
Q.18) Sorting of ___________ arrays including arranging elements according to the keys or values.
Answer:- Associative
Q.19) PHP ___________ method is a PHP super global variable which is used to collect data after submitting the HTML form.
Answer:- $_POST
Q.20) ____________ is an associative array consisting of the contents of $_GET, $_POST, and $_COOKIE.
Answer:- $_REQUEST
Q.21) ________ is an associative array of items uploaded to the current script via the HTTP POST method.
Answer:- $_FILES
Q.22) PHP provides an additional set of predefined arrays containing variables from the web server the environment, and user input. The new arrays are called as_____________.
Answer:- Superglobals
Q.23) The entries in_____________array are created by the web server.
Answer:- $_SERVER
Want to read more?
Subscribe to questionbankos.com to keep reading this exclusive post.