|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-24 10:31 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 21:00:01 2025 UTC |
Description: ------------ I'm looked in code of var_export and found excess method call. in ext/standart/var.c in method PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{ */ We hava a switch: switch (Z_TYPE_PP(struc)) { And little bottom we have a case for array(php5.*/6) line ~407: break; case IS_ARRAY: myht = Z_ARRVAL_PP(struc); if (level > 1) { php_printf("\n%*c", level - 1, ' '); } PUTS ("array (\n"); zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_array_element_export, 1, level, (Z_TYPE_PP(struc) == IS_ARRAY ? 0 : 1)); And We see, that the "Z_TYPE_PP(struc)" is aleready and always IS_ARRAY. We must remove (Z_TYPE_PP(struc) == IS_ARRAY ? 0 : 1) and replace it to "0". Have a nice day =)