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 is the use of header() function in php?

0 Answers  


How to take a substring from a given string in php?

0 Answers  


How long do php sessions last?

0 Answers  


What is final keyword in php?

0 Answers  


What are the difference between abstract class and interface?

4 Answers  






What function do we use to find length of string, and length of array?

0 Answers  


How does php strcmp work?

0 Answers  


What is the importance of parser in php?

0 Answers  


How do you execute a php script from the command line?

0 Answers  


How to remove an empty directory?

0 Answers  


how to use particular city location in php?

1 Answers   TCS,


How can we know the count/number of elements of an array?

1 Answers  


Categories