Skip to content

Instantly share code, notes, and snippets.

View shlomohass's full-sized avatar
💬
Excited working on a new HUUUGE Idea...

Shlomo Hassid shlomohass

💬
Excited working on a new HUUUGE Idea...
View GitHub Profile
@shlomohass
shlomohass / php_hashing_checksum_performance.php
Last active February 29, 2024 21:54
This test will compare checksum methods with php hashing procedures and some basic ones too -> crc32(), md5(), sha1(), xor(), xor2(), add(). The text is randomly generated each iteration to avoid caching, the test also use several text length that will be different each iteration.
<?php
/*******************************************************************************
* Created by: shlomo hassid.
* Release Version : 1.1
* Creation Date: 02/04/2018
*
* This test will compare checksum methods with php hashing procedures and some
* basic ones to -> crc32(), md5(), sha1(), xor(), xor2(), add().
* The text is randomly generated each iteration to avoid caching, the test also
* use several text length that will be defferent each iteration.
@steve-todorov
steve-todorov / csv-to-array.php
Last active August 29, 2015 14:19
Get csv data as an array
<?php
set_time_limit(0);
ini_set('memory_limit',-1);
function parse_csv_assoc($str,&$f) {
if (empty($f)) { $f = str_getcsv($str); }
return @array_combine($f, str_getcsv($str));
}