Are objects passed by value or by reference?



Are objects passed by value or by reference?..

Answer / Shaziya Rahman

In PHP, objects are passed by reference by default. If you want to pass an object by value, you can use the clone operator.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Is it easy to learn php?

1 Answers  


How to get the number of visitors in a site?

2 Answers  


how can attached a file to a mail and attached a resume to a mail and received in id

0 Answers  


What is php and its advantages?

1 Answers  


How does php isset work?

1 Answers  


How to get number of days between two given dates using PHP?

1 Answers  


What are the correct and the most two common way to start and finish a PHP block of code?

1 Answers  


What does php exit do?

1 Answers  


What is the importance of php?

1 Answers  


How to execute an sql query? How to fetch its result?

1 Answers  


Do you know when sessions ends?

1 Answers  


What is array filter in php?

1 Answers  


Categories