Created
March 19, 2011 22:50
-
-
Save bxt/877885 to your computer and use it in GitHub Desktop.
Odysseus forces Cassandra reveal her private nickname using horse. :D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Trojan { | |
private $priv; | |
function __construct($priv) { | |
$this->priv=$priv; | |
} | |
function horse(Trojan $t) { | |
return $t->priv; | |
} | |
} | |
$cassandra=new Trojan("sandy"); | |
$odysseus=new Trojan("der Listenreiche"); | |
echo $odysseus->horse($cassandra)."\n"; // "sandy" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment