1--TEST-- 2GH-10232 (Weird behaviour when a file is autoloaded in assignment of a constant) 3--FILE-- 4<?php 5 6set_include_path('gh10232-nonexistent') or exit(1); 7chdir(__DIR__) or exit(1); 8 9spl_autoload_register(function () { 10 trigger_error(__LINE__); 11 $ex = new Exception(); 12 echo 'Exception on line ', $ex->getLine(), "\n"; 13 require_once __DIR__ . '/gh10232/constant_def.inc'; 14}, true); 15 16 17class ConstantRef 18{ 19 public const VALUE = ConstantDef::VALUE; 20} 21 22ConstantRef::VALUE; 23 24?> 25--EXPECTF-- 26Notice: 7 in %sgh10232.php on line 7 27Exception on line 8 28 29Notice: constant_def.inc in %sconstant_def.inc on line 3 30Exception in constant_def.inc on line 4 31 32Notice: required.inc in %srequired.inc on line 3 33Exception in required.inc on line 4 34