diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/pomo/plural-forms.php --- a/wp/wp-includes/pomo/plural-forms.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/pomo/plural-forms.php Fri Sep 05 18:40:08 2025 +0200 @@ -6,6 +6,7 @@ * @since 4.9.0 */ if ( ! class_exists( 'Plural_Forms', false ) ) : + #[AllowDynamicProperties] class Plural_Forms { /** * Operator characters. @@ -109,19 +110,19 @@ // Ignore whitespace. case ' ': case "\t": - $pos++; + ++$pos; break; // Variable (n). case 'n': $output[] = array( 'var' ); - $pos++; + ++$pos; break; // Parentheses. case '(': $stack[] = $next; - $pos++; + ++$pos; break; case ')': @@ -143,7 +144,7 @@ throw new Exception( 'Mismatched parentheses' ); } - $pos++; + ++$pos; break; // Operators. @@ -188,7 +189,7 @@ $o2 = $stack[ $s_pos ]; if ( '?' !== $o2 ) { $output[] = array( 'op', array_pop( $stack ) ); - $s_pos--; + --$s_pos; continue; } @@ -201,7 +202,7 @@ if ( ! $found ) { throw new Exception( 'Missing starting "?" ternary operator' ); } - $pos++; + ++$pos; break; // Default - number or invalid. @@ -263,7 +264,7 @@ $total = count( $this->tokens ); while ( $i < $total ) { $next = $this->tokens[ $i ]; - $i++; + ++$i; if ( 'var' === $next[0] ) { $stack[] = $n; continue; @@ -319,13 +320,13 @@ case '!=': $v2 = array_pop( $stack ); $v1 = array_pop( $stack ); - $stack[] = $v1 != $v2; + $stack[] = $v1 !== $v2; break; case '==': $v2 = array_pop( $stack ); $v1 = array_pop( $stack ); - $stack[] = $v1 == $v2; + $stack[] = $v1 === $v2; break; case '?:':