- var_dump: documentation ( source)
<?php
class A{
public function __get($name){
return "A";
}
public function __set($name,$value){
$this->{$name} = $value;
return "C";
}
}
$a = new A();
// The return value of __set() is ignored
// because of the way PHP processes the assignment operator
$k = $a->b = "B";
var_dump($a,$k);