Skip to content

Instantly share code, notes, and snippets.

View InfinitumForm's full-sized avatar
🧮
Working on the awesomeness

INFINITUM FORM InfinitumForm

🧮
Working on the awesomeness
View GitHub Profile
@nielsvr
nielsvr / .htaccess
Created November 5, 2018 12:08
Bad bots list for htaccess or vhosts.conf
RewriteCond %{HTTP_USER_AGENT} \
12soso|\
192\.comagent|\
1noonbot|\
1on1searchbot|\
3de\_search2|\
3d\_search|\
3g\ bot|\
3gse|\
50\.nu|\
@joseluisq
joseluisq / stream_get_line.md
Last active March 17, 2022 07:09
Comparative between PHP `stream_get_line` and `fgets` about processing large files

Comparative between PHP stream_get_line and fgets about processing large files

Source: http://ie2.php.net/manual/en/function.fgets.php#113113

Regarding Leigh Purdie's comment (from 4 years ago) about stream_get_line being better for large files, I decided to test this in case it was optimized since then and I found out that Leigh's comment is just completely incorrect fgets actually has a small amount of better performance, but the test Leigh did was not set up to produce good results.

The suggested test was: