For PDO::ATTR_EMULATE_PREPARES, the manual states a boolean value is required. However, when getAttribute() is used to check this value, an integer (1 or 0) is returned rather than true or false.
This means that if you are checking a PDO object is configured as required then
<?php
if ($pdo->getAttribute(\PDO::ATTR_EMULATE_PREPARES) !== false) {
}
?>
will always 'do something', regardless.
Either
<?php
if ($pdo->getAttribute(\PDO::ATTR_EMULATE_PREPARES) != false) {
}
?>
or
<?php
if ($pdo->getAttribute(\PDO::ATTR_EMULATE_PREPARES) !== 0) {
}
?>
is needed instead.
Also worth noting that setAttribute() does, in fact, accept an integer value if you want to be consistent.