Fix order of key/val setting for IterNext helpers
commitf60fc06fc0f9d9f9f60904bad8f7b8906f2b9ca6
authorAlex Malyshev <alexanderm@fb.com>
Tue, 15 Apr 2014 04:10:27 +0000 (14 21:10 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 15 Apr 2014 16:41:57 +0000 (15 09:41 -0700)
tree1a628562253d0bd0282d9bc241d7ffe64fe02706
parent911657add39e0e5756342b1dd15cf606e9532a40
Fix order of key/val setting for IterNext helpers

The correct ordering is to set the value first, then the key. (if it
exists) After combing runtime/base/array-iterator.cpp, I found a few
instances where we had this flipped.

Reviewed By: @jdelong

Differential Revision: D1275430
hphp/runtime/base/array-iterator.cpp
hphp/test/slow/eval_order/1501.php