Skip to content

Instantly share code, notes, and snippets.

@robbinhan
Created March 17, 2012 05:15
Show Gist options
  • Save robbinhan/2055259 to your computer and use it in GitHub Desktop.
Save robbinhan/2055259 to your computer and use it in GitHub Desktop.
php的array_chunk源码中模除的巧妙用法
/* If reached the chunk size, add it to the result array, and reset the
* pointer. */
if (!(++current % size)) {
add_next_index_zval(return_value, chunk);
chunk = NULL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment