Changeset 43035 for branches/4.9/src/wp-includes/compat.php
- Timestamp:
- 04/30/2018 03:46:07 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/compat.php
r41178 r43035 498 498 require_once ABSPATH . WPINC . '/spl-autoload-compat.php'; 499 499 } 500 501 if ( ! function_exists( 'is_countable' ) ) { 502 /** 503 * Polyfill for is_countable() function added in PHP 7.3. 504 * 505 * Verify that the content of a variable is an array or an object 506 * implementing Countable. 507 * 508 * @since 4.9.6 509 * 510 * @param mixed $var The value to check. 511 * 512 * @return bool True if `$var` is countable, false otherwise. 513 */ 514 function is_countable( $var ) { 515 return ( is_array( $var ) || $var instanceof Countable ); 516 } 517 }
Note: See TracChangeset
for help on using the changeset viewer.