PHP Part-II
Sign in to Google to save your progress. Learn more
What is the value of $result in this calculation? *
1 point
Captionless Image
What is the cause of 'Cannot modify header information - headers already sent'? *
1 point
The following XML document is in books.xml. Which code will output "Historical"? *
1 point
Captionless Image
You want to list the modules available in your PHP installation. What command should you run? *
1 point
A PDO object called $db has been set up to use for database operations, including user authentication. All user-related properties are set. The script line public function __construct(&$db) shows a constructor that initializes all user-related properties to _ if no user has logged in. These parameters will be properly set by the login functions when a user logs in. *
1 point
What would be a good name for this function? *
1 point
Captionless Image
Which php control structure is used inside a loop to skip the rest of the current loops code and go back to the start of the loop for the next iteration *
1 point
What is the job of the controller as a component in MVC? *
1 point
What are getters and setters? *
1 point
What will this code print? *
1 point
Captionless Image
Both triple === and double == can be used to ** variables in php. If you want to hear that string "33" and the number 33 are equal, you would use ** . If you want to check if an array contains a particular string value at a particular index, you would use _ *
1 point
Your php page is unexpectedly rendering as totally blank. Which step will shed light on the problem? *
1 point
The php not operator is !. Given the snippet, is there an out put and what is it? *
1 point
Assuming that $first_name and $family_name are valid strings, which statement is invalid? *
1 point
You are using the following code to decide if a button is clicked, but it is never returning true. Which step is most likely to shed light on the problem? *
1 point
Captionless Image
When it comes to the value of a variable, what is the difference between NULL and empty? *
1 point
Assuming the Horse class exists, which is a valid example of inheritance in PHP? *
1 point
If you want to pass a formfield to another page when a button is clicked, you should use the ** . If you want to store information across multiple pages, you should use the ** ? *
1 point
Which is the way to create an array of "seasons"? *
1 point
You are using the following code to find a users band, but it is returning false. Which step(s) would solve the problem? *
1 point
Captionless Image
Both self and this are keywords that can be used to refer to member variables of an enclosing class. The difference is that $this->member should be used for ** members and self::$member should be used for ** members. *
1 point
Why should you follow a PSR standard? *
1 point
Which code snippet demonstrates encapsulation? *
1 point
Why does this code trigger an error? *
1 point
Captionless Image
Which code would you use to print all the elements in an array called $cupcakes? *
1 point
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.