Exemplo n.º 1
0
 function sleepWith($who)
 {
     parent::sleepWith($who);
     if ($who instanceof Lannister) {
         print "Not even if I'm drunk !\n";
     }
 }
Exemplo n.º 2
0
 function sleepWith($obj)
 {
     if ($obj instanceof Cersei) {
         echo "With pleasure, but only in a tower in Winterfell, then." . PHP_EOL;
     } else {
         parent::sleepWith($obj);
     }
 }
Exemplo n.º 3
0
 function sleepWith($partnair)
 {
     if ($partnair instanceof Cersei) {
         print "With pleasure, but only in a tower in Winterfell, then" . PHP_EOL;
     } else {
         parent::sleepWith($partnair);
     }
 }
Exemplo n.º 4
0
 function sleepWith($who)
 {
     parent::sleepWith($who);
     if ($who instanceof Cersei) {
         print "With pleasure, but only in a tower in Winterfell, then.\n";
     } else {
         if ($who instanceof Lannister) {
             print "Not even if I'm drunk !\n";
         }
     }
 }
Exemplo n.º 5
0
 function __construct()
 {
     parent::__construct();
     print "My name is Tyrion" . PHP_EOL;
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct();
     print "My name is Tyrion\n";
 }
Exemplo n.º 7
0
 public function __construct()
 {
     Lannister::__construct();
     echo "My name is Tyrion" . PHP_EOL;
 }