Annotation of embedaddon/php/Zend/tests/constants_002.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Defining constants with non-scalar values
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: define('foo', new stdClass);
        !             7: var_dump(foo);
        !             8: 
        !             9: define('foo', fopen(__FILE__, 'r'));
        !            10: var_dump(foo);
        !            11: 
        !            12: ?>
        !            13: --EXPECTF--
        !            14: Warning: Constants may only evaluate to scalar values in %s on line %d
        !            15: 
        !            16: Notice: Use of undefined constant foo - assumed 'foo' in %s on line %d
        !            17: string(%d) "foo"
        !            18: resource(%d) of type (stream)

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