note 90296 modified in function.spl-object-hash by danbrown

From: Date: Wed, 15 Apr 2009 12:54:21 +0000
Subject: note 90296 modified in function.spl-object-hash by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153307@lists.php.net to get a copy of this message
Easy does it <?php if (!function_exists('spl_object_hash')) { /** * Returns the hash of the unique identifier for the object. * * @param object $object * @author Andreas Rein * @return string */ function spl_object_hash($object) { if (is_object($object)) { return md5((string)$object); } trigger_error(__FUNCTION__ . "() expects parameter 1 to be object", E_USER_WARNING); return null; } } ?> --was-- Easy does it if (!function_exists('spl_object_hash')) { /** * Returns the hash of the unique identifier for the object. * * @param object $object * @author Andreas Rein * @return string */ function spl_object_hash($object) { if (is_object($object)) { return md5((string)$object); } trigger_error(__FUNCTION__ . "() expects parameter 1 to be object", E_USER_WARNING); return null; } } http://php.net/manual/en/function.spl-object-hash.php

« previous php.notes (#153307) next »