Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    Can you guarantee that the item you're adding is AFTER the current position? If not, then it won't get processed anyway.
    – Ed Marty
    Commented May 9, 2011 at 2:08
  • It sounds like you would be better off using array_map
    – samshull
    Commented May 9, 2011 at 2:12
  • Ed, yes, an apt point. Mostly this is a stack I'm iterating over, and events early on the stack might add events to be run later. Commented May 9, 2011 at 2:41
  • 1
    samshull, not sure how you see a usage for that? Array_map iterates and runs functions over those items, but does not alter the number of items in an array, does it? Commented May 9, 2011 at 2:43
  • Well, I've gone through google.com/codesearch/p?hl=en#EKZaOgYQHwo/unstable/sources/…, and nothing jumps out, except some room for improvement with the Z_ARRVAL_PP implementation (near this comment in the source files; "/* * This is where the magic happens. */" :) Brilliant. Commented May 9, 2011 at 4:51