Users Also Read
Read MCQ's/Objective questions
MCQ's Search Engine
Important Question
ASP.NET
Basic Computer Knowledge
Basic of Linux/Unix
C Language
C# Programming
C++ Programming
Computer Graphics
Computer Hardware
Computer Networking
Computer Security - Cyber crime & Laws
Data Structures & Algorithms
Database Management System
Digital Computer Electronics
HTML
Important File Extensions
Imp. Shortcut Keys used in Computer
Internet, Web & Email
Java - Concepts and Its Programming
Language Processors
Management Information System (MIS)
MS Access
MS Excel
MS Word
Operating System
Oracle, SQL & PL/SQL
Power Point
Programming Languages
Software Engineering
System Analysis and Design (SAD)
System software & compiler design
Tally
VB.NET
Visual Basic
Home⇒ Computer Engineering⇒ Php basic
1-Dont try to cram or spend more time here just read it fast and cover syllabus then practice MCQ's cheptor of same topic to check your progress. . |
2-Wrong options are also given but dont concentrate there, Right answer is in bold format. |
Q1 ⇒ Which function returns an array consisting of associative key/value pairs? array_count_values() [other wrong options] [Discuss in forum] array_count() count_values() count() |
Q2 ⇒ Output : < ?php echo str_pad("Salad", 5)." is good."; ?> Salad is good [other wrong options] [Discuss in forum] is good Salad SaladSaladSaladSaladSalad is good is good SaladSaladSaladSaladSalad |
Q3 ⇒ Which method scope prevents a method from being overridden by a subclass? Final [other wrong options] [Discuss in forum] Static Abstract Protected |
Q4 ⇒ Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class? static [other wrong options] [Discuss in forum] private final protected |
Q5 ⇒ Which of the following is/are the right way to declare a method? Both (a) and (b) [other wrong options] [Discuss in forum] function functionName() { function body } scope function functionName() { function body } None |
Q6 ⇒ Which method is used to tweak an object’s cloning behavior? __clone() [other wrong options] [Discuss in forum] _clone object_clone() clone() |
Q7 ⇒ Which of the following is/are an exception? All of the above [other wrong options] [Discuss in forum] OutOfRangeException OutOfBoundException OverflowException |
Q8 ⇒ When you use the $_POST variable to collect data, the data is visible to only you [other wrong options] [Discuss in forum] selected few everyone none |
Q9 ⇒ Which one of the following statements instantiates the mysqli class? $mysqli = new mysqli() [other wrong options] [Discuss in forum] mysqli->new.mysqli() mysqli = new mysqli() $mysqli->new.mysqli() |
Q10 ⇒ Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query? affected_rows() [other wrong options] [Discuss in forum] new_rows() num_rows() changed_rows() |
Q11 ⇒ We can use ___ to comment a single line? All of the above [other wrong options] [Discuss in forum] /* */ # // |
Q12 ⇒ Output : < ?php $color = "maroon"; $var = $color[2]; echo "$var" ; ?> r [other wrong options] [Discuss in forum] $var a Error |
Q13 ⇒ Which one of the followingPHP functions can be used to build a function that accepts any number of arguments? func_get_argc() [other wrong options] [Discuss in forum] get_argv() get_argc() func_get_argv() |
Q14 ⇒ Which function sets the file filename’s last-modified and last-accessed times? touch() [other wrong options] [Discuss in forum] set() touched() sets() |
Q15 ⇒ Output : < ?php echo ord ("hi"); ?> 104 [other wrong options] [Discuss in forum] 103 106 None |
Q16 ⇒ Which version of PHP introduced Try/catch Exception? PHP 5 [other wrong options] [Discuss in forum] PHP 4 PHP 6 PHP 5.3 |
Q17 ⇒ Output : < ?php $op2 = "blabla"; function foo($op1) {echo $op1; echo $op2; } foo("hello"); ?> hello [other wrong options] [Discuss in forum] Error helloblablablabla helloblabla |
Q18 ⇒ Which of the following PHP statements will output Hello World on the screen? All of the above [other wrong options] [Discuss in forum] echo (“Hello World”); print (“Hello World”); sprintf (“Hello World”); |
Q19 ⇒ Which in-built function will add a value to the end of an array? array_push() [other wrong options] [Discuss in forum] inend_array() into_array() array_unshift() |
Q20 ⇒ Output : < ?php $num = 10; echo 'What is her age? \n She is $num years old'; ?> What is her age? \n She is $num years old [other wrong options] [Discuss in forum] What is her age? She is 10 years old What is her age?She is $num years old What is her age?She is 10 years old |
Or |