fork download
  1. <?php
  2.  
  3. class SchrodingersPituh {
  4. public $count = 0;
  5. public function __construct() {
  6. }
  7. public function __toString() {
  8. $this->count ^= 1;
  9. return $this->count ? '' : '1';
  10. }
  11. }
  12.  
  13. function kukarek($pituh) {
  14. if (!"$pituh") {
  15. echo "Ne pituh\n";
  16. }
  17. if ("$pituh") {
  18. echo "Pituh\n";
  19. }
  20. }
  21.  
  22. kukarek(new SchrodingersPituh());
Success #stdin #stdout 0.02s 25836KB
stdin
Standard input is empty
stdout
Ne pituh
Pituh