xref: /PHP-8.2/tests/classes/autoload_017.phpt (revision d30cd7d7)
1--TEST--
2Ensure ReflectionClass::implementsInterface triggers autoload.
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6  echo "In autoload: ";
7  var_dump($name);
8});
9
10$rc = new ReflectionClass("stdClass");
11
12try {
13  $rc->implementsInterface("UndefI");
14} catch (ReflectionException $e) {
15  echo $e->getMessage();
16}
17?>
18--EXPECT--
19In autoload: string(6) "UndefI"
20Interface "UndefI" does not exist
21