Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php final class PhabricatorSumChartFunction extends PhabricatorHigherOrderChartFuncti..
Decoded Output download
<?php
final class PhabricatorSumChartFunction
extends PhabricatorHigherOrderChartFunction {
const FUNCTIONKEY = 'sum';
protected function newArguments() {
return array(
$this->newArgument()
->setName('f')
->setType('function')
->setRepeatable(true),
);
}
public function evaluateFunction(array $xv) {
$fv = array();
foreach ($this->getFunctionArguments() as $function) {
$fv[] = $function->evaluateFunction($xv);
}
$n = count($xv);
$yv = array_fill(0, $n, null);
foreach ($fv as $f) {
for ($ii = 0; $ii < $n; $ii++) {
if ($f[$ii] !== null) {
if (!isset($yv[$ii])) {
$yv[$ii] = 0;
}
$yv[$ii] += $f[$ii];
}
}
}
return $yv;
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorSumChartFunction
extends PhabricatorHigherOrderChartFunction {
const FUNCTIONKEY = 'sum';
protected function newArguments() {
return array(
$this->newArgument()
->setName('f')
->setType('function')
->setRepeatable(true),
);
}
public function evaluateFunction(array $xv) {
$fv = array();
foreach ($this->getFunctionArguments() as $function) {
$fv[] = $function->evaluateFunction($xv);
}
$n = count($xv);
$yv = array_fill(0, $n, null);
foreach ($fv as $f) {
for ($ii = 0; $ii < $n; $ii++) {
if ($f[$ii] !== null) {
if (!isset($yv[$ii])) {
$yv[$ii] = 0;
}
$yv[$ii] += $f[$ii];
}
}
}
return $yv;
}
}
Function Calls
None |
Stats
MD5 | 809e8da128c6949451b89f0eaa1c08f4 |
Eval Count | 0 |
Decode Time | 88 ms |