[wp-trac] [WordPress Trac] #42264: Systematic way of dealing with compat code and polyfills

WordPress Trac noreply at wordpress.org
Thu Mar 29 07:18:20 UTC 2018


#42264: Systematic way of dealing with compat code and polyfills
----------------------------+------------------------------
 Reporter:  schlessera      |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by ayeshrajans):

 👍👌 for `extension_loaded` calls to detect availability. That really
 makes the code more readable too.
 <bike-shedding>
 There are few arguments in outside PHP communities to use
 `function_exists` vs `extension_loaded` - `function_exists` is tiny bit
 faster and functions can be disabled in `php.ini` where `extension_loaded`
 would happily return true, but `function_exists` doesn't.

 </bike-shedding>

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


More information about the wp-trac mailing list