note 1324 rejected from phpdevel by didou
| From: | didou@php.net | Date: | Fri, 03 Oct 2003 11:45:56 +0000 |
| Subject: | note 1324 rejected from phpdevel by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57717@lists.php.net to get a copy of this message | ||
Note Submitter: chrisv@chrisv.darkhaven.net
----
One thing i've noted is that hash_find() and hash_exists() don't work with php4.
<p>
if(hash_find(arr->value.ht, "key",<br> sizeof("key"), (void *)tmp) ==
SUCCESS) {<br>
stuff...<br>
} else {<br>
other stuff...<br>
}<br>
<p>
The code that is written using that won't load into PHP. Use _php3_hash_find() and
_php3_hash_exists() instead:
<p>
if(_php3_hash_exists(arr->value.ht, "key", sizeof("key"), (void *)tmp)
{<br>
stuff <br>
} else {<br>
more stuff <br>
}<br>
<p>
It works with both, although the "(void *)" needs to be changed to "(void **) for
php4.