PHP: Cannot reference a class implementing an interface before its definition (but can without an interface)

When it comes to “access class before definition”: Why is php treating a standalone class differently from a class implementing an interface?
I thought the following code should work, but it doesn’t. (Tried with php 7.3.9 and 8.1.11, with or without namespaces…)
I know that the order of interface and class definitions is important in case of “extends” and “implements”, but this is a different issue here.

Is this a php ‘bug’ / inconsistency, or a specific language rule I oversighted?

<?php

// This works fine:
$a1 = new A();
// The following line causes error:
$b1 = new B();
// Fatal error: Uncaught Error: Class "B" not found in D:CodingPHPstrange.php:6

class A {}

interface I {}

class B implements I {}

// After the class definitions everything is fine (after commenting out line #6 of course)
$a2 = new A();
$b2 = new B();

Note: this old thread is somewhat similar, but not quite the same.