mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
53aed48e5d
This was separately discussed in https://externals.io/message/114863, but also necessary for consistency now that https://wiki.php.net/rfc/new_in_initializers has landed. Closes GH-7149.
17 lines
237 B
PHP
17 lines
237 B
PHP
--TEST--
|
|
Defining constants with non-scalar values
|
|
--FILE--
|
|
<?php
|
|
|
|
define('foo', new stdClass);
|
|
var_dump(foo);
|
|
|
|
define('bar', fopen(__FILE__, 'r'));
|
|
var_dump(bar);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(stdClass)#1 (0) {
|
|
}
|
|
resource(%d) of type (stream)
|