[wp-meta] [Making WordPress.org] #3135: Browse Happy API: Replace require() with require_once()

Making WordPress.org noreply at wordpress.org
Tue Sep 19 08:04:54 UTC 2017

#3135: Browse Happy API: Replace require() with require_once()
 Reporter:  ronakganatra  |       Owner:
     Type:  enhancement   |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  API           |  Resolution:  wontfix
 Keywords:  has-patch     |

Comment (by SergeyBiryukov):

 Replying to [comment:3 ronakganatra]:
 > I have added this as an improvement. because it adds file every time
 instead if we use require_once it only include that file once so,
 efficiency will be improved.

 `require_once()` is actually [http://gazehawk.com/blog/php-require-
 performance/ slower than require()], because it has to check if the file
 has already been included. The performance difference might be negligible,
 but the function still should not be changed without a good reason.

Ticket URL: <https://meta.trac.wordpress.org/ticket/3135#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list