[wp-trac] [WordPress Trac] #55069: Optimize fread() calls using file_get_contents() or stream_get_contents()

WordPress Trac noreply at wordpress.org
Mon Apr 11 01:42:28 UTC 2022


#55069: Optimize fread() calls using file_get_contents() or stream_get_contents()
---------------------------+-----------------------------
 Reporter:  maxkellermann  |       Owner:  SergeyBiryukov
     Type:  enhancement    |      Status:  accepted
 Priority:  normal         |   Milestone:  6.0
Component:  General        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  performance
---------------------------+-----------------------------

Comment (by peterwilsoncc):

 Given it's a microoptimisation, I'd rather avoid additional sniff
 suppression and maintain the `is_readable()`:

 * if the sniff is wrong/too strict that ought to be discussed
 * with recent PHP changes, avoiding the STHU operator seems wise

 If anything it's probably the methods being called that needs to change
 but that's a discussion for another ticket.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55069#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list