At 4:48 PM +0200 10/4/01, [EMAIL PROTECTED] wrote: >(From behind filing cabinet where I am ducking preparing for flames). > >Is it just me or is there anyone else that thinks PHP suffers from not >being modular. Let me explain myself. If you write a module for a lot of >procedural languages it sits on the filling system and is called up when it >is needed , loaded into memory and executed. There maybe some cashing which >happens but this is basically how it works. > >PHP on the other hand seems to load in ALL the code that MAY be run. i.e. >an include brings things in which are inside an if, even if the if equates >to false.
Not true; require() has this behavior, but include() does not. See http://php.he.net/manual/en/function.require.php and http://php.he.net/manual/en/function.include.php -steve > >This means that the language is not extendible in the way others are. If >you do write a function you wish to include in 'only the pages you wish to >use' you have to first include it, then call it. > >This has also meant that things like spell checking functions are built >into the core module rather than called in as or when they are needed. > >Then there is the way database connectivity is handled. > >There are a load of functions (again in the core language) with there NAMES >containing the name of the database you are connecting to. > >For example all MySQL functions are mysql_something and I guess all oracle >ones are oracle_something. This would only be a minor inconvenience >because wrapper functions can be written but from what I can gather >different databases have different functionality available. > >I know this is partly because different databases have different >functionality. what I would expect to see is a load of generic function >which attempt to provide same functionality where it is available or >implement some of the functionality themselves. Obviously for some of the >less sophisticated databases these functions would have to do more work and >maybe some functionality wouldn't be available in certain databases (but >only the things like stored procedures). If you can deal with the 'lowest common denominator' approach, use ODBC. Or, as you mentioned, use one of the db wrapper classes available in PHPLIB, PEAR or Metabase. -steve -- +------------------------ Open source questions? ------------------------+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]