MongoDB\BSON\Binary::getType
PHP function
Edit on GitHub ✎
(mongodb >=1.0.0)
Returns the Binary's type
Description
MongoDB\BSON\Binary::getType(): int
Parameters Parameters
Return Values
Returns the Binary's type.
Errors/Exceptions
Examples
MongoDB\BSON\Binary::getType() example
php
<?php
$binary = new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC);
var_dump($binary->getType());
?>The above example will output:
output
int(0)See Also
- BSON Types