MongoId::isValid

(PECL mongo >= 1.5.0)

MongoId::isValidCheck if a value is a valid ObjectId

Opis

public static MongoId::isValid ( mixed $value ) : bool

This method may be used to check a variable before passing it as an argument to MongoId::__construct().

Parametry

value

The value to check for validity.

Zwracane wartości

Returns TRUE if value is a MongoId instance or a string consisting of exactly 24 hexadecimal characters; otherwise, FALSE is returned.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top