Changeset 43034 for trunk/src/wp-includes/compat.php
- Timestamp:
- 04/30/2018 03:42:46 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r42343 r43034 506 506 require_once ABSPATH . WPINC . '/spl-autoload-compat.php'; 507 507 } 508 509 if ( ! function_exists( 'is_countable' ) ) { 510 /** 511 * Polyfill for is_countable() function added in PHP 7.3. 512 * 513 * Verify that the content of a variable is an array or an object 514 * implementing Countable. 515 * 516 * @since 4.9.6 517 * 518 * @param mixed $var The value to check. 519 * 520 * @return bool True if `$var` is countable, false otherwise. 521 */ 522 function is_countable( $var ) { 523 return ( is_array( $var ) || $var instanceof Countable ); 524 } 525 }
Note: See TracChangeset
for help on using the changeset viewer.