Skip to content

Instantly share code, notes, and snippets.

@ZZromanZZ
Last active December 19, 2015 01:39
Show Gist options
  • Save ZZromanZZ/5877735 to your computer and use it in GitHub Desktop.
Save ZZromanZZ/5877735 to your computer and use it in GitHub Desktop.
<?php
class A {
private $property = "This text should be ALLWAYS accessible\n";
public function doSomething(A $instance) {
if($instance === $this) {
echo $this->property;
echo $instance->property;
}
}
}
$a1 = new A();
$a1->doSomething($a1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment