I've thought about this for the remainder of the day, and I can't see any good reason why this functionality should not be implemented into the core; it's basic fucntionality, a safe way of doing things and couldn't take more than a day or two to add in from a single developer, and surely it'd be no more than a couple of kb's worth compiled, if that!

Also, it's a bit of minor piece of functionality to warrent a PECL/PEAR Extension, and even more hassle for somebody to reasearch, find and download it - all to do some basic arithmetic.

Can anybody give me an argument as to why this functionality should not be incorporated into the core?

Many Regards

Nathan Rixham


Alexey Zakhlestin wrote:
On 12/7/07, Mike <[EMAIL PROTECTED]> wrote:
Yes, an easy way to handle this functionality that is safe to use with
user input would be REALLY nice.

Specifically for allowing users to specify custom formulas to do all
sorts of nifty stuff. Especially in reporting and payroll/commission
applications.

We're currently working on a reporting class where we would like the
user to able to specify custom columns in XML, ie:

$col5 = ($col1 / $col2) * ($col3 / $col4)

Or in our payroll application where customers want to calculate custom
commissions for sales people:

$commission = ($gross_sales - $gross_pay - $medical_benefits -
$chargebacks) * $employee_commission_bracket

In this case, you might find embedding usableā€¦

http://pecl.php.net/package/lua
http://pecl.php.net/package/python
http://pecl.php.net/package/perl


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to