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