php-src/Zend/tests/constants_002.phpt
Steph Fox 6d8760677d - killed off UEXPECT
- altered EXPECT for parser errors. This may or may not be a Good Thing.
2008-05-26 14:33:44 +00:00

19 lines
371 B
PHP

--TEST--
Defining constants with non-scalar values
--FILE--
<?php
define('foo', new stdClass);
var_dump(foo);
define('foo', fopen(__FILE__, 'r'));
var_dump(foo);
?>
--EXPECTF--
Warning: Constants may only evaluate to scalar values in %s on line %d
Notice: Use of undefined constant foo - assumed 'foo' in %s on line %d
unicode(%d) "foo"
resource(%d) of type (stream)