From: ram...@php.net Operating system: n/a PHP version: 5.3SVN-2009-08-13 (SVN) PHP Bug Type: Feature/Change Request Bug description: Expose function in Zend API for comparing arrays by identity
Description: ------------ I'm using the embed SAPI, and I came across an issue when using zend_hash_compare(). I wanted to use the provided hash_zval_compare_function() as the callback function for the compar parameter. However, I cannot use this, since it is not exposed. I could use zend_compare_arrays(), but it doesn't allow me to pass in a 1 as the value of the ordered parameter sent to zend_hash_compare(). Since I want to compare arrays like comparing with the identity operator, then I need to use zend_hash_compare() and create my own callback that does exactly what hash_zval_compare_function() does, thus reinventing the wheel. Either: 1) Expose hash_zval_compare_function() so it can be used by third-party apps - or - 2) Make a second version of zend_compare_arrays() that allows you to compare arrays by identity (i.e. zend_compare_arrays_identity()?) -- Edit bug report at http://bugs.php.net/?id=49242&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49242&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49242&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49242&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49242&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49242&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49242&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49242&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49242&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49242&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49242&r=support Expected behavior: http://bugs.php.net/fix.php?id=49242&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49242&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49242&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49242&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49242&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49242&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49242&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49242&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49242&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49242&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49242&r=mysqlcfg