From:             oglodek dot marek at pronox dot com
Operating system: linux/windows
PHP version:      5.1.6
PHP Bug Type:     Feature/Change Request
Bug description:  array_slice feature

Description:
------------
there is not posibble (now) to set third(3)(length) parametr in
array_slice on end of table where you using preserve_keys. Now You must
write somthing like this:
array_slice($array, $offset, count($array), true);
my idea is => if length is true then set pointer at end of array:
array_slice($array, $offset, true, true);
ps: sorry for my english (i im polish:P)
best regards,
Marek Oglodek aka Tsharek ([EMAIL PROTECTED])

Reproduce code:
---------------
line 2192 in array.c file(php 5.1.6):
        if (argc >= 3) {
                convert_to_long_ex(length);
                length_val = Z_LVAL_PP(length);
        } else {
                length_val = zend_hash_num_elements(Z_ARRVAL_PP(input));
        }


Expected result:
----------------
line 2192 in array.c file(php 5.1.6):
        if (argc >= 3 && !zend_is_true(length)) {
                convert_to_long_ex(length);
                length_val = Z_LVAL_PP(length);
        } else {
                length_val = zend_hash_num_elements(Z_ARRVAL_PP(input));
        }


-- 
Edit bug report at http://bugs.php.net/?id=39194&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39194&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39194&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39194&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39194&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39194&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39194&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39194&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39194&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39194&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39194&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39194&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39194&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39194&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39194&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39194&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39194&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39194&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39194&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39194&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39194&r=mysqlcfg

Reply via email to