WordPress/wp-includes/pomo
Sergey Biryukov 4f856dfae0 Code Modernization: Use stream_get_contents() in POMO_FileReader::read_all().
`stream_get_contents()` is faster than `fread()`, because the PHP core can decide how to best read the remaining file; it could decide to issue just one `read()` call or `mmap()` the file first.

Per the PHP manual, `file_get_contents()` or `stream_get_contents()` is the preferred way to read the contents of a file into a string. It will use memory mapping techniques if supported by the OS to enhance performance.

Reference: [https://www.php.net/manual/en/function.file-get-contents.php PHP Manual: file_get_contents()].

Follow-up to [12174].

Props maxkellermann.
See #55069.
Built from https://develop.svn.wordpress.org/trunk@52696


git-svn-id: http://core.svn.wordpress.org/trunk@52285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-09 12:33:05 +00:00
..
entry.php Docs: Various inline documentation corrections and improvements. 2021-12-07 12:20:02 +00:00
mo.php Coding Standards: Add public visibility to methods in src directory. 2021-10-18 17:52:58 +00:00
plural-forms.php Docs: Various docblock improvements. 2020-12-10 23:59:03 +00:00
po.php Docs: Update spelling for inline comments in a few files. 2022-01-25 13:55:05 +00:00
streams.php Code Modernization: Use stream_get_contents() in POMO_FileReader::read_all(). 2022-02-09 12:33:05 +00:00
translations.php Coding Standards: Add public visibility to methods in src directory. 2021-10-18 17:52:58 +00:00