xref: /PHP-7.4/tests/classes/autoload_012.phpt (revision 162aa1a5)
1--TEST--
2Ensure callback methods in unknown classes trigger autoload.
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6  echo "In autoload: ";
7  var_dump($name);
8});
9call_user_func("UndefC::test");
10?>
11--EXPECTF--
12In autoload: string(6) "UndefC"
13
14Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d
15