News Page

All News, Current & Old

Real News


From just a basic test of deleting a ton of elements from a gigantic array, array_splice seems to be a lot quicker and less memory intensive. This matches with what I'd expect: array_values() seems to be making a copy of the array, while array_splice works in place. – Doug Kavendek Dec 1 '14 at 17:01
array_values is a useful approach when you are removing elements in a loop and want the indexes to be consistent, but then want to compress them out after the loop array_values is a useful approach when you are removing elements in a loop and want the indexes to be consistent, but then want to compress them out after the loop array_values is a useful approach when you are removing elements in a loop and want the indexes to be consistent, but then want to compress them out after the loop

Posted By

David Paul

Date Uploaded      05 Sep 2017 3:49PM
Expiry Date      20 Sep 2017 12:00PM