File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug65322.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:04:04 2014 UTC (10 years, 10 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

    1: --TEST--
    2: Bug #65322: compile time errors won't trigger auto loading
    3: --FILE--
    4: <?php
    5: 
    6: spl_autoload_register(function($class) {
    7:     var_dump($class);
    8:     class B {}
    9: });
   10: 
   11: set_error_handler(function($_, $msg, $file) {
   12:     var_dump($msg, $file);
   13:     new B;
   14: });
   15: 
   16: eval('class A { function a() {} function __construct() {} }');
   17: 
   18: ?>
   19: --EXPECTF--
   20: string(50) "Redefining already defined constructor for class A"
   21: string(%d) "%s(%d) : eval()'d code"
   22: string(1) "B"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>