Skip to content

Instantly share code, notes, and snippets.

@bxt
Created March 19, 2011 22:50
Show Gist options
  • Save bxt/877885 to your computer and use it in GitHub Desktop.
Save bxt/877885 to your computer and use it in GitHub Desktop.
Odysseus forces Cassandra reveal her private nickname using horse. :D
<?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