An object in PHP is created using the new keyword followed by the class name.
- new
- create
- instanceof
- object
In PHP, to create an object from a class, you use the new keyword followed by the class name and parentheses. The correct option is "new." This instantiates an object based on the defined class. For more information, consult the PHP documentation on creating objects: http://php.net/manual/en/language.oop5.php
Loading...
Related Quiz
- What is the static variable in a function useful for?
- How are strings defined in PHP?
- Which PHP function is used to check if a variable is of a specified type?
- PHP is loosely typed, meaning:
- You have a PHP script and you need to access data sent via the POST method from a form. How would you do this using the $_POST superglobal?