Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35525 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10407 invoked by uid 1010); 15 Feb 2008 14:48:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 10392 invoked from network); 15 Feb 2008 14:48:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2008 14:48:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 209.85.200.171 wf-out-1314.google.com Received: from [209.85.200.171] ([209.85.200.171:23775] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/6D-26828-F46A5B74 for ; Fri, 15 Feb 2008 09:48:48 -0500 Received: by wf-out-1314.google.com with SMTP id 27so119535wfd.26 for ; Fri, 15 Feb 2008 06:48:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=662e+1xfnPrMV6lpRfH0DFAp1bYN9/dtB6tLxx2caS4=; b=MrYqHRaUtJbAeaqN9fZzHKItDKyK340jUzQrkf/G55QQnwSIeegCzMDnOz8Q4UTXaZoBsACTE+uP0jPL57EKchlZewrIu5jcoHskzgJXntRFsObjOUdaheklPxRlfcymXQE/LER2gSus22mW8FlWPsxEtO93lyLrpphQepGfQr4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eS0puDITki5yf4LgQzaGtlW8duuNTXmqrz47At/FvSs++bfiSAPOLqJtQNPvs0cuOwxsn290wUNGsBv4H/FzYw138w70pF4YHUq0CU0VibySu8EZ/yE0VSCkvky4k82gGfzsUd4ZfkoVUfjja/pjYBiDXRFqsCwhYEPgyxvjSM0= Received: by 10.142.230.11 with SMTP id c11mr2320453wfh.145.1203086924596; Fri, 15 Feb 2008 06:48:44 -0800 (PST) Received: by 10.142.240.16 with HTTP; Fri, 15 Feb 2008 06:48:44 -0800 (PST) Message-ID: Date: Fri, 15 Feb 2008 07:48:44 -0700 To: jani.taskinen@iki.fi Cc: "PHP Internals List" In-Reply-To: <47B5A476.602@sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <971575499.20080209153315@marcus-boerger.de> <47B56334.9070007@zend.com> <1203070677.10500.12.camel@localhost.localdomain> <47B568A6.9060704@zend.com> <1158304008.20080215122414@marcus-boerger.de> <47B58B5D.9020301@zend.com> <47B5917C.5050606@sci.fi> <81BAF097-DF7D-4A3D-AED6-A22C912C83DB@daleenterprise.com> <47B5A3E5.4020006@zend.com> <47B5A476.602@sci.fi> Subject: Re: [PHP-DEV] [RFC] Conditional INI support From: chrisstocktonaz@gmail.com ("Chris Stockton") It might be to late to keep it simple, once you add basic language components like IF-ELSE as you can see people already want basically another programming language embedded into it. It is my opinion that the INI files should be simple configuration files. Otherwise they will become more and more feature rich and people will start shifting program complexity from the PHP application to the INI file. This might not be the intention of the people in this list as you are all pretty sharp, but have you read some of the online tutorials on php? I just think this kind of feature would be badly abused... -Chris On Fri, Feb 15, 2008 at 7:40 AM, Jani Taskinen wrote: > Dmitry, please don't throw gasoline on the flames. > We have to keep the ini files as simple as possible, this isn't the job of > the ini file. > > --Jani > > > Dmitry Stogov kirjoitti: > > > > The idea makes sense too, but mix of C and SH syntax isn't good. > > > > Dmitry. > > > > BuildSmart wrote: > >> Now that what-if's are occurring in the theoretical world of > >> intelligent INI, what about file testing capabilities so that the > >> following can be used to preload extensions by existance? > >> > >> #if -f ${EXTENSIONS_DIR}/gd.so > >> extension=gd.so > >> #endif > >> > >> or some other syntax that allows testing to include an extension > >> On Feb 15, 2008, at 8:19 AM, Jani Taskinen wrote: > >> > >>> > >>> 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 > >>>>> > >>> > >>> -- > >>> PHP Internals - PHP Runtime Development Mailing List > >>> To unsubscribe, visit: http://www.php.net/unsub.php > >>> > >>> > >> > >> -- Dale > >> > >> > >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >