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.)
-Sterling
--
"A business that makes nothing but money is a poor kind of business."
- Henry Ford
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.)
Sounds like a good idea for me, especially when taking into account that
pragma_set() can be called within a auto_prepend-file, which makes it
pretty easy to add "backwards compatibility" to a whole project without
much work.
--
- Martin Martin Jansen
http://martinjansen.com/
Sterling Hughes sterling@bumblebury.com wrote:
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.)
How about using "declare" statement?
Moriyoshi
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