Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78954 invoked by uid 1010); 15 Feb 2008 13:20:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78939 invoked from network); 15 Feb 2008 13:20:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2008 13:20:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.178 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.178 mho-01-bos.mailhop.org Received: from [63.208.196.178] ([63.208.196.178:56584] helo=mho-01-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/68-26828-F7195B74 for ; Fri, 15 Feb 2008 08:19:59 -0500 Received: from [81.22.163.71] (helo=[127.0.0.1]) by mho-01-bos.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JQ0To-0008cU-3E; Fri, 15 Feb 2008 13:19:52 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 81.22.163.71 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19yD7FLL9dUdQZbtB6hqA956KlgdoaB704= Message-ID: <47B5917C.5050606@sci.fi> Date: Fri, 15 Feb 2008 15:19:56 +0200 Reply-To: jani.taskinen@iki.fi User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Dmitry Stogov CC: Marcus Boerger , jani.taskinen@iki.fi, PHP Internals List , Andi Gutmans References: <971575499.20080209153315@marcus-boerger.de> <47B54F0C.2090700@zend.com> <1203067815.10500.5.camel@localhost.localdomain> <47B56334.9070007@zend.com> <1203070677.10500.12.camel@localhost.localdomain> <47B568A6.9060704@zend.com> <1158304008.20080215122414@marcus-boerger.de> <47B58B5D.9020301@zend.com> In-Reply-To: <47B58B5D.9020301@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Conditional INI support From: jani.taskinen@sci.fi (Jani Taskinen) Currently UNDEFINED would be just string 'UNDEFINED'. Doesn't atoi() for non-numeric string make it 0 ?? (or null..:) So that would work without changing anything.. --Jani Dmitry Stogov kirjoitti: > I think it will work. > > #ifdef UNDEFINED > 5 (false) > #ifdef UNDEFINED <= 5 (true) > > (but anyway I think it is possible to find out an unclear condition) > > Dmitry. > > Marcus Boerger wrote: >> Hello Dmitry, >> >> shouldn't this be like in C/C++ where a non existing value is >> treated like >> an empty string which behaves like false in boolean evaluations? >> >> marcus >> >> Friday, February 15, 2008, 11:25:42 AM, you wrote: >> >>> #if defined(PHP_MAJOR_VERSION) && PHP_MAJOR_VERSION >= 6 >>> extension="unicode.so" >>> #endif >> >>> Here PHP_MAJOR_VERSION is a PHP constant that is not defined in >>> php-5.3 but might be defined in the future version. >> >>> Dmitry. >> >> >>> Jani Taskinen wrote: >>>> On Fri, 2008-02-15 at 13:02 +0300, Dmitry Stogov wrote: >>>>> Jani Taskinen wrote: >>>>>>> c) We can use just "value" insted of ${value} in conditions. >>>>>> Yup. ${foobar} is actually not any "variable" per se, but just a >>>>>> reference to existing ini entry in the file. And I don't think that >>>>>> needs to change. >>>>> Oh, I see. Then we can use just "$string" (or "$str.str") for ini >>>>> entries and "string" for PHP constants. We can also implement >>>>> defined() macro-function, to check if constant defined. >>>> Why? Don't make php.ini parsing any more complex than it already >>>> is(n't). >>>> Any string which can pass as constant will have that constant's (or >>>> environment variable) value. Why do you need any "variable" in there >>>> anyway? And why do you need defined() ??? (examples please? :) >>>> >>>> --Jani >>>> >> >> >> >> >> Best regards, >> Marcus >> >