Re: [PHP4BETA] cvs: /php4 php.h /php4/ext/standard basic_functions.c basic_functions.h php3_string.h string.c /php4/tests testarray

From: Date: Mon, 20 Sep 1999 22:37:57 +0000
Subject: Re: [PHP4BETA] cvs: /php4 php.h /php4/ext/standard basic_functions.c basic_functions.h php3_string.h string.c /php4/tests testarray
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4713@lists.php.net to get a copy of this message
On Mon, 20 Sep 1999, Rasmus Lerdorf wrote: > > For example, the two functions I added today, to obtain the the number of > > arguments and a certain argument, definitely belong in PHP and not Zend. > > I assume you have PHP and Zend reversed in this sentence? Well, I was under severe lack of food&water pressure :) > > > Basic functions, such as strlen(), and basic array manipulation functions > > such as count() and each(), also belong in Zend, since you would need them > > in any program that embeds Zend, be it PHP or MySQL. Error reporting > > level, which is something that's built into the scripting engine, should > > also be controllable from Zend, whether this is PHP or some other program. > > I can see this. But let's try to avoid having any user callable functions > named zend_* unless they are really querying something in Zend's > internals. We definitely don't want zend_strlen() at the user-level, for > example. The idea behind the PHP/Zend separation, is that Zend can be > unbundled and included in something else. This separation should work in > both directions. If someone was to write a different scripting engine > they would need to provide a compatible API as well as engine-internal > implementations of something like strlen() and as such calling it > zend_strlen() is not logical. I disagree about the both-directions approach (it's not uncommon for high level stuff to rely on low level stuff, and not the other way around), but that's not the issue. There are two reasons these functions are prefixed with zend_(): 1. They are in fact querying Zend's internals and are a language-level feature (unlike strlen() or any of the other functions Andi moved). 2. I didn't want to use non-prefixed names in order not to clash with people's functions. Zeev -- ----------------------------------------------------- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#4713) next »