What is happening in the following code
$objA = new A(); // A is a class
$objB = $objA;

Answer Posted / prakash

The object variable $objA and $objB is contains the same
value. The $objA is get the value and to assign the value
to $objB. So both are contains the same value in the
program.

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to know user has read the email-php?

674


What is the use of array_count_values() in php?

718


What happens when submit button is clicked?

679


With a heredoc syntax, do I get variable substitution inside the heredoc contents?

827


How to Retrieve the Session ID of the Current Session?

702






What is cookie in php with example?

672


How many types of php frameworks are there?

658


What is session data?

717


Give the case where we can use get and we can use post methods?

741


Is jquery better than javascript?

715


Is it possible to extend the execution time of a php script?

699


What is final class and final method in php?

737


How to set session.gc_maxlifetime properly?

746


Is array function in php?

701


What is the difference between require_once and require in php?

757