title: Reference: Return type of ... should either be compatible with ..., or the #[\ReturnTypeWillChange] attribute should be used
body: <p>In PHP 8.1, the following code, which worked in previous versions:</p>
  <pre class="lang-php prettyprint-override"><code>class Example implements Countable {
      public function count() {
          return 42;
      }
  }
  </code></pre>
  <p>Raises a deprecation notice:</p>
  <blockquote>
  <p>Deprecated: Return type of Example::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice</p>
  </blockquote>
  <p>What does this mean, and how should I fix it?</p>