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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / manoj kumar

This is a object cloning in php5.

Is This Answer Correct ?    1 Yes 2 No

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

Answer / puneet bhatt

variable $objA and varable $objB contains the same value.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More PHP Interview Questions

Does php require a web server?

0 Answers  


What is meant by pdo in php?

0 Answers  


What is if isset ($_ post submit )) in php?

0 Answers  


What is the difference between single-quoted and double-quoted strings in php?

0 Answers  


Explain what is smarty?

0 Answers  






Difference between $message vs. $$Message in php.

0 Answers  


How to remove an empty directory?

0 Answers  


how to get server date and time?

10 Answers  


Does php has a future?

0 Answers  


Is it more secure to use cookies to trfer session ids?

0 Answers  


Tell me will a comparison of an integer 12 and a string "13" work in php?

0 Answers  


What is the role of the .htaccess file in php?

0 Answers  


Categories