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

What are the ways we can destroy a session variable ?

3 Answers  


What library is used for pdf in php?

0 Answers  


Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?

0 Answers  


When to use single quotes, double quotes, and backticks?

0 Answers  


What is meant by nl2br()?

4 Answers   Rushmore Consultancy,






What is the default session out time?

0 Answers  


does current version of mysql (myisam) supports foreign keys ?

2 Answers  


How can we create a database using php?

0 Answers  


Can you extend a final defined class?

0 Answers  


Why php script is not running in browser?

0 Answers  


Explain the difference between require() and require_once()?

0 Answers  


how set session expire time in php?

4 Answers  


Categories