Created
August 16, 2024 00:15
-
-
Save westonruter/56a13b48231098236da6b8545d82e37c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sizes_values = array_filter( | |
array_map( | |
static function ( string $size ): string { | |
$size = trim( $size, " \t\f\r\n" ); | |
$lower_sizes = strtolower( $size ); | |
if ( 'auto' === $lower_sizes ) { | |
// Normalize to lower-case. | |
$size = $lower_sizes; | |
} | |
return $size; | |
}, | |
explode( ',', $sizes ) | |
) | |
); | |
$has_auto = isset( $sizes_values[0] ) && 'auto' === $sizes_values[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment