Online Test for PHP
- Find Error/Output in follwing code:
<?php
$val1 = 42;
if(ctype_digit($val1)) {
echo "Integer";
} else {
echo "Not Integer";
}
$val2 = '42';
if(ctype_digit($val2)) {
echo "Integer";
} else {
echo "Not Integer";
}
?>
Not Integer Integer
Integer Not Integer
Integer Integer
Not Integer Not Integer
- In PHP 5, how can you write a class so that some of its properties cannot be accessed from outside its methods?
By declaring the class as privateBy declaring the property as privateIt cannot be doneBy writing a property overloading method
- If class implementing the interface does not use exact same method signatures as are defined in the interface. Will show
No ErrorFatal ErrorWarning ErrorNotice Error
- What function split an array into chunks?
array_chunk()array_split()array_split_chunkarray_chunks()
- _______ function is used to sort an array in ascending order by value while preserving key associations.
ksort()asort()krsort()usort()
- PHP stands for
Process Hypertext PreprocessorPreprocessor HypertextHypertext PreprocessorNone of the above
- To create instance of class "new" keyword is not required.
TrueFalse
- The variable name is case-sensitive in PHP.
TrueFalse
- If property of class is declare using var then PHP5 will treat the property as?
ProtectedPrivatePublicFinal
- What will range('a', 'z') return?
Find difference between 'a' to 'z'An alphabetically ordered array of letters from 'a' to 'z'Will only apply on integer valueNone of the above
Also Exercise
Post Your Question
Social Sharing
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015