Toggle navigation
Login / Register
Ask Questions
Study
Current Affairs
Previous Papers
Kerala PSC
IBPS
UPSC
RBI
TNPSC
MPSC
SSC
CBSE
United States
Model Tests
News
More
Answers
Coaching Centres
Careers
Downloads
Colleges
Kuwait News & Classifieds
Classic Jhumka Earrings Silver
INR 113.00
Free Shipping
Buy Now
Black Jhumka Earrings & Studs
INR 94.00
Free Shipping
Buy Now
Classic Jhumka Earrings Silver
INR 207.00
Free Shipping
Buy Now
Beautiful stud earing
INR 93.00
Free Shipping
Buy Now
Different Size Hoop and Stud Earrings Set
INR 243.00
Free Shipping
Buy Now
Golden Hoop Earing
INR 70.00
Free Shipping
Buy Now
×
Create account with Openguide
Sign Up
By clicking Sign Up, you agree that you have read and accepted the
Open Guide Online User Agreement.
Already have an account?
Log in
×
Login to OpenGuide
Login
Forgot password?
Reset it
New user?
Register
×
Reset your password
Reset Password
Registered user?
Log in
New user?
Register
Home
Practice Tests
General Knowledge Practice Tests
General Knowledge Quiz - Question & Answers Set - 16
15 Questions
Time Left -
General Knowledge Quiz - Question & Answers Set - 16
Question 1 :
What is the special meaning of __sleep and __wakeup
A
__sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
Question 2 :
How can we extract string 'abc.com ' from a string http://info@abc.com using regular expression of php
A
We can use the preg_match() function with "/.*@(.*)$/" as the regular expression pattern. For example: preg_match("/.*@(.*)$/","http://info@abc.com",$data); echo $data[1];
Question 3 :
What is the difference between the functions unlink and unset
A
unlink() is a function for file system handling. It will simply delete the file in context. unset() is a function for variable management. It will make a variable undefined.
Question 4 :
How can we create a database using PHP and mysql
A
We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.
Question 5 :
For printing out strings, there are echo, print and printf. Explain the differences.
Question 6 :
What is the use of function ucwords
A
ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, itÔÇÖs worth using strtolower() first.
Question 7 :
What is the difference between htmlentities() and htmlspecialchars()
A
htmlspecialchars only takes care of <, >, single quote ÔÇÿ, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
Question 8 :
Which are the hashing functions in PHP
A
md5() crc32() sha1()
Question 9 :
How can we destroy the session, how can we unset the variable of a session
A
session_unregister() - Unregister a global variable from the current session session_unset() - Free all session variables
Question 10 :
What are the different functions in sorting an array
A
Array sorting functions in PHP: asort() arsort() ksort() krsort() uksort() sort() natsort() rsort()
Question 11 :
How can we know the count/number of elements of an array
A
There are two ways a) sizeof($array) - This function is an alias of count() b) count($array) - This function returns the number of elements in an array.
Question 12 :
What is the difference between md5(), crc32() and sha1() crypto on PHP
A
The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.
Question 13 :
Will comparison of string "10" and integer 11 work in PHP
A
Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
Question 14 :
What is meant by MIME
A
MIME is Multipurpose Internet Mail Extensions is an Internet standard for the format of e-mail. However browsers also uses MIME standard to transmit files. MIME has a header which is added to a beginning of the data. When browser sees such header it shows
Question 15 :
What is meant by nl2br()?
A
nl2br() converts all new line characters to HTML tag
Model Question Papers
Union Bank of India PO 2008 English Language
Binder Grade II Logical Reasoning & Mathematics
KSIE Junior Assistant Logical Reasoning & Mathematics
Kerala PSC LDC Thrissur 2003 Logical Reasoning & Mathematics
Kerala PSC LDC Palakkad 2003 Logical Reasoning & Mathematics
×
Invite your friends to attend test
Invite Now
Help & Support
About Us
Contact Us
Terms of Service