Reply to comment

It does work, but differently

As commenting was inoperative due to a site issue, I wrote my comment as a blog post.

In short, it does work as designed and specified, but it may not perhaps be what you would intuitively expect (i.e. counting back 10 elements starting at the start point). Instead, it counts forward from the start point, until 10 elements before the end point (which in this case lies well before the start point, even outside the array), which explains why the empty array is returned.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options