I have a script php code
<?php
class A
{
public $x;
}
$a = new A();
$a->x = 10;
$b = &$a;
$b = new A();
$b->x = 20;
echo $a->x;
When try to understand code I think the result is
10
But the result is: 20
I don't undersand what's going on!,
I also try with bing:
Hope someone can help me explain the code. Thank you :()