What's wrong with these hashtable iteration code?

From: Date: Mon, 21 Jul 2014 03:12:19 +0000
Subject: What's wrong with these hashtable iteration code?
Groups: php.internals 
Request: Send a blank email to internals+get-75733@lists.php.net to get a copy of this message
Hi, I'm trying to iterate through a hash table, But the zend_hash_get_current_key() doesn't seem to move forward: I'm getting duplicate output at the 'fprintf' part. for(zend_hash_internal_pointer_reset_ex(ht, &pos); zend_hash_has_more_elements_ex(ht, &pos) == SUCCESS; zend_hash_move_forward_ex(ht, &pos)) { if (zend_hash_get_current_key (ht, &string_key, &num_key, 0) != HASH_KEY_IS_STRING) continue; fprintf (stderr, "string key: %s\n", string_key); } Any ideas? -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33

« previous php.internals (#75733) next »