<?php $a = new stdClass;$a->var = 1;$b = $a;$c = clone $a;$b->var = 2; echo $a->var, PHP_EOL, $c->var;
Standard input is empty
2 1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!