1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/you-can-use-native-php-functions-like-fopen-and-fread-to-interact-directly-with-file-streams.md
Samuel Štancl b451d14953 Week 11/2022
2022-03-20 20:41:25 +01:00

694 B

title tweet_id thread_slug author_username images created_at slug
You can use native PHP functions like `fopen` and `fread` to interact directly with file *streams* 1505269897340731395 weekly-thread-2022-11 aarondfrancis
https://pbs.twimg.com/media/FN1LRG-WYAgu4aT.jpg
2022-03-19T19:48:04+00:00 you-can-use-native-php-functions-like-fopen-and-fread-to-interact-directly-with-file-streams

One of my favorite things about using S3 in PHP is that you can register a stream wrapper to interact with files.

You can use the native PHP functions like fopen, fread, etc.

Very helpful when you have massive files you don't want to load into memory!

(CSVs are a use case.)