Changeset 43037 for branches/4.9/src/wp-includes/compat.php
- Timestamp:
- 04/30/2018 04:16:43 AM (8 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/compat.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/compat.php
r43035 r43037 504 504 * 505 505 * Verify that the content of a variable is an array or an object 506 * implementing Countable.506 * implementing the Countable interface. 507 507 * 508 508 * @since 4.9.6 … … 516 516 } 517 517 } 518 519 if ( ! function_exists( 'is_iterable' ) ) { 520 /** 521 * Polyfill for is_iterable() function added in PHP 7.1. 522 * 523 * Verify that the content of a variable is an array or an object 524 * implementing the Traversable interface. 525 * 526 * @since 4.9.6 527 * 528 * @param mixed $var The value to check. 529 * 530 * @return bool True if `$var` is iterable, false otherwise. 531 */ 532 function is_iterable( $var ) { 533 return ( is_array( $var ) || $var instanceof Traversable ); 534 } 535 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)