Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -167,7 +167,7 @@ function wu_human_time_diff($from, $limit = '-5 days', $to = false): string {
*/
function wu_convert_php_date_format_to_moment_js_format($php_date_format): string {
$replacements = array(
$replacements = [
'A' => 'A', // for the sake of escaping below
'a' => 'a', // for the sake of escaping below
'B' => '', // Swatch internet time (.beats), no equivalent
@ -206,7 +206,7 @@ function wu_convert_php_date_format_to_moment_js_format($php_date_format): strin
'y' => 'YY',
'Z' => '', // time zone offset in minutes => moment().zone();
'z' => 'DDD',
);
];
// Converts escaped characters.
foreach ($replacements as $from => $to) {