But especially
Chris:
PHP:
<?php
$constants = array(
'F/a' => 'mass', // http://en.wikipedia.org/wiki/Newton%27s_laws_of_motion#Newton.27s_second_law:_fundamental_law_of_dynamics
'783487' => 'y', // arbitrary number
's' => 'preg_replace', // perl )-:
2.71828 => 'e', // http://en.wikipedia.org/wiki/E_%28mathematical_constant%29
'x' => '278127', // arbitrary number
'278127' =>'Christ', // http://en.wikipedia.org/wiki/%CE%A7
'y' => '783487',
);
$formula = array(
'M',
2.71828,
'r', /* pow(r, 2) */
'r', /* = r*r = rr */
( pow((1/$constants['y']), -1) ),
"\n",
sqrt(pow($constants['x'], 2)),
$constants['F/a'], // force = F; acceleration = a
"\n",
's/ss/s'
);
$adjust = array_pop($formula);
$message = '';
foreach ($formula AS $p) {
if (isset($constants[$p])) {
$message .= $constants[$p];
} else {
$message .= $p;
}
}
list($func, $regex, $replace) = explode('/', $adjust);
$message = call_user_func($constants[$func],"/{$regex}/","{$replace}", $message);
echo $message;
?>