Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2616 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80180 invoked from network); 23 Jun 2003 15:35:10 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 23 Jun 2003 15:35:10 -0000 Received: (qmail 26050 invoked from network); 23 Jun 2003 15:35:03 -0000 Received: from localhost (HELO zeev-laptop.zend.com) (127.0.0.1) by localhost with SMTP; 23 Jun 2003 15:35:03 -0000 Reply-To: zeev@zend.com Message-ID: <5.1.0.14.2.20030623183442.08535478@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 23 Jun 2003 18:44:43 +0300 To: Sterling Hughes Cc: internals@lists.php.net In-Reply-To: <1056304763.6262.5.camel@hasele> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] implicit_clone From: zeev@zend.com (Zeev Suraski) References: <1056304763.6262.5.camel@hasele> At 20:59 22/06/2003, Sterling Hughes wrote: >hi, > >currently, soley for backwards compatibility purposes we provide the >ze2.implicit_clone option. this option is globally settable, and may be >used by shared hosting providers to make it more likely that old scripts >can run unmodified. this however makes it extremely hard, and inelegant >for people relying on new "functionality" in php5 to write portable php5 >scripts. more specifically, it would require every portable script to >do: > >ini_set('ze2.implicit_clone', 0); > >at the top of their script. > >i think we should remove this ini option in favor of a function that >does the same thing. this way implicit_clone() is not globally >settable, but is settable per script. something in the way of a: > >pragma_set('implicit_clone', true); > >which would turn on implicit_clone for the current script (current >portion of code.) A few notes: First, either way we don't need a new function - if we wanted to do it, we could simply prevent users from using it except for with ini_set() (tag it with ZEND_INI_USER only). Second, I think that the advantages and disadvantages here are about the same, without there being a perfect solution. If we don't allow people to set it globally, upgrading becomes much more annoying. On the other hand, if we do - new PHP 5 scripts will have to explicitly turn this compatibility mode off if they want to be absolutely certain that it's not there. My personal opinion leans towards allowing people to set it on a global scale, so that it makes upgrading much simpler - I wouldn't want to force people to start hacking all of their files before they can even test whether PHP 5 works for them. Maybe we can go for a compromise - enable it with ZEND_INI_PERDIR and ZEND_INI_UUSE. That way it will be possible to use it with httpd.conf / .htaccess / ini_set(), but not with php.ini, so people will at least have to make a slightly more informed decision to enable it. Just a suggestion, I'm not sure I like it myself :) Zeev