Re: New configure option for class syntax

From: Date: Mon, 19 Jun 2000 14:00:07 +0000
Subject: Re: New configure option for class syntax
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21734@lists.php.net to get a copy of this message
Sterling Hughes wrote: > Your right. I hadn't thought of this. Perhaps to fix this we could have an > --enable-both option. That way users can use the function based interface and > the class based interface, or it can be made a php.ini option. This must not be optional, if it is going to work. Instead all versions of PHP must be able to create a class X for module x simply by examining the current function entry list for that module, stripping of the prefix. The important thing is that this must not be optional, and that it must not require changes to the module code, but should be done (if at all) by the module registration function, which should generate a class and dispatch table for that class automatically. Even then old versions of PHP would not be able to run scripts making use of the new syntax. It would then be possible to enable this feature for all or all needed classes by throwing a switch in php.ini. > Albeit this further clutters the namespace, however, it would work real nice > for creating database independent API's, I mean think of it, changing: > > $dbh = new MySQL(...); > > to: > > $dbh = new mSQL (...); > > might be all that would be required for changing from MySQL to mSQL. That allows > PHP to have database independence in the C API. Have you had a look at the database functions in PHP and tried to compare Oracle access to MySQL access at function call level? This is not going to help at all, let alone solve the problem of Sql incompatibility. Kristian -- Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel Tel: +49 431 386 436 00, Fax: +49 431 386 435 99 Using PHP3? See our web development library at http://phplib.netuse.de/

« previous php.dev (#21734) next »