fork(2) download
  1. <?php
  2.  
  3. class CallStatus
  4. {
  5. const STATUS_INCOMING = 1;
  6. const STATUS_OUTGOING = 2;
  7. }
  8.  
  9. class CallRecord
  10. {
  11. private $status;
  12.  
  13. public function __construct(int $status)
  14. {
  15. $this->status = $status;
  16. }
  17.  
  18. public function getStatus(): string
  19. {
  20. return $this->status;
  21. }
  22. }
  23.  
  24. $cr = new CallRecord(CallStatus::STATUS_INCOMING);
  25. var_dump($cr->getStatus() === CallStatus::STATUS_INCOMING); // false
  26.  
  27.  
Success #stdin #stdout 0.01s 82560KB
stdin
Standard input is empty
stdout
bool(false)