Skip to content

Instantly share code, notes, and snippets.

View machitgarha's full-sized avatar
🤓
Towards an open-source career...

Mohammad Amin Chitgarha machitgarha

🤓
Towards an open-source career...
View GitHub Profile
@nunoveloso
nunoveloso / nuno_php_array_ops.php
Created March 7, 2012 12:34
PHP array operations up to 10x faster than the original
/**
* Home mande method to do array_diff ~10x faster that PHP built-in.
*
* @param The array to compare from
* @param An array to compare against
*
* @return an array containing all the entries from array1 that are not present in array2.
*/
function nuno_array_diff($array1, $array2) {
$diff = array();