2 years ago

#67333

test-img

David

PHP object property false evaluation with operator "=="

Can somebody explain this? (PHP Version 7.2.18)

$data = new stdClass(); 
$data->status = 0;
print($data->status == "foo"); //true
print($data->status === "foo"); //false

php

object

evaluation

0 Answers

Your Answer

Accepted video resources