Remember
Register
1
new
Chill
new
Puzzles
new
GK
new
Sports
new
Business
Home
Questions
MCQs
Unanswered
Tags
Users
Ask a Question
Write Article
Articles
Connect to us
Which of the following method acts as a constructor function in a PHP class?
0
votes
1,178
views
A
class_name()
B
__construct
C
constructor
D
none of the above
Correct Option: 2
Explanation:
PHP provides a special function called __construct() to define a constructor. You can pass as many as arguments you like into the constructor function.
interview questions
php
posted
Dec 5, 2017
by
anonymous
Looking for an answer? Promote on:
Your comment on this post:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Similar Questions
0
votes
Which of the following method of Exception class retrieve the error message when error occured in PHP?
0
votes
Which of the following function is used to get environment variables in PHP?
0
votes
Which of the following is used to delete a cookie in PHP?
0
votes
Which of the following is correct about constants in PHP?
0
votes
Which of the following is true about php.ini file?
...