Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9726 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32417 invoked by uid 1010); 8 May 2004 04:14:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 32158 invoked by uid 1007); 8 May 2004 04:14:37 -0000 Message-ID: <20040508041437.32151.qmail@pb1.pair.com> To: internals@lists.php.net Date: Fri, 7 May 2004 21:16:11 -0700 Lines: 12 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Posted-By: 64.142.6.231 Subject: Why can constants only be scalars? From: pollita@php.net ("Sara Golemon") Long ago I was told constants could only be scalars, so I accepted it. Certainly ZEND_FUNCTION(define) does the check to ensure it's a scalar, but why? For what I can tell a zend_constant is just a container for an ordinary zval which is refcounted and all that fun stuff. I don't see any obvious reason for this restriction, and my tests with those restrictions removed seem safe enough so far... Can someone spell it out for me with little words? -Sara