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 18:35:11 +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-4692@lists.php.net to get a copy of this message
At 08:14 PM 9/20/99 +0200, Thies C. Arntzen wrote:
On Mon, 20 Sep 1999, Andrei Zmievski wrote: Andi Gutmans wrote:
andi                Mon Sep 20 12:56:03 1999 EDT
Modified files:
    /php4   php.h
    /php4/ext/standard      basic_functions.c basic_functions.h
                            php3_string.h string.c
    /php4/tests     testarray
Log: - Internal functions which are basic language functions should be
in Zend
    and not in PHP. I.e. strlen(), each(), error_reporting(), count(),
    get_class_name().
Why? First of all, now you have PHP_FUNCTION(..) in Zend and that's not really fitting. Secondly, I don't think it's a good idea to move some functions to Zend just like that. Where do you draw the line? I think all PHP callable functions should stay in PHP source tree. i have to agree to Andrey!
I'll explain to you the reason. Zeev and I implemented a few internal functions without which the Zend scripting engine just wouldn't a useful programing language. - strcmp() for example was implemented in order to make up for the fact that if you try to compare "11" with "109" with the == sign you wouldn't get what you expected if you would want a strict string compare and not an intelligent auto-typing compare. - each() was created to make up for the fact that PHP 3.0 didn't have a foreach(). - error_reporting() is very Zend specific and changes a value in the op_array. - get_class_name() is completely language specific. These kind of functions, which are completely Zend specific and without which we would lose serious language functionality, should be sitting as part of the Zend library in case we decide to use Zend in some other product, for example something like MySQL. These very basic functions were written by Zeev and me so I don't see a license problem with including them in Zend. If I make some mistake, and put a function there, which you wrote and completely disagree to have it as part of the Zend library let me know, and I'll either rewrite it or move it back. This probably didn't happen because the only functions I intend on moving are low level language functions which most probably Zeev or I wrote. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#4692) next »