Please wait while we load your page...
 

Announcements

PHP Manual :: MongoId::isValid



MongoId::getTimestamp || MongoId::__set_state || MongoId || PHP Manual

(PECL mongo >= 1.5.0)

MongoId::isValidCheck if a value is a valid ObjectId

Description

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

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

Parameters

value

The value to check for validity.

Return Values

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



MongoId::getTimestamp || MongoId::__set_state || MongoId || PHP Manual
Live Chat Not Available