[PHP-DEV] PHP4 and Midgard, was Re: [midgard-dev] PHP 4.0.0 final From: Henri Bergius (Henri.Bergius <email protected>)
Date: 05/22/00

Cc:ing to php-dev as this is probably of interest
also to people there.

On 22 May, Sean D. Ackley wrote:
> I know this is probably a topic that has been beaten to
> death, but how hard would it be to get the php_midgard
> patch directly coded into the main PHP core development
> tree? I mean, they have every other database system in
> place, why not get Midgard as an actual compile option?

There are two places affected by our patched version.

The Midgard database accessing functions (mgd_get_record,
etc) could be added quite easily as a normal extension
to PHP, just like all the database support functions
(of, say, MySQL) are.

However, what is more tricky is the need for patching
the PHP language scanner (Zend in PHP4) brought in by
Midgard's style templating and variable substitution.

PHP could probably integrate the variable substitution
code into official PHP (it is a rather useful feature,
and not in any way related to Midgard -- you can
type &(variable); instead of <?php echo $variable; ?>
making easier to maker readable code), if there is
interest to this in their development team.

The templating system is a different beast. This is
a very Midgard-dependent feature at the point, and
so wouldn't probably make much sense to add into
regular PHP -- at least without some kind of utility
for serving the elements from filesystem.

On a longer term, it would be good to have all these
features integrated into PHP. At this point what would
already help would be to make the Midgard database
functions a normal PHP extension, reducing the size
of the patch. Then next point would be to include the
patched language scanner as well -- possibly as an
alternative version with some IFDEFs.

Please comment.

> sean.

/Bergie

-- 
-- Henri Bergius -- +358 40 525 1334 -- Henri.Bergius <email protected> --
               http://www.iki.fi/Henri.Bergius

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>