<?php
<?php
$integers = [1, 99];
$intRes = 0;
foreach ($integers as $iValue)
{
$intRes += $iValue;
}
$floats = [0.01, 0.99];
$floatRes = 0;
foreach ($floats as $fValue)
{
$floatRes += $fValue;
}
echo number_format($intRes / 100, 2);
echo number_format($floatRes, 2);
$array = [0.01, 0.99];
$sum = 0;
foreach ($array as $value)
{
$sum += $value;
}
echo number_format($value, 2);
- Output for 7.0.0 - 7.0.1
- Parse error: syntax error, unexpected '<', expecting end of file in /in/d4gLU on line 4
Process exited with code 255. - Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
- Parse error: syntax error, unexpected '<' in /in/d4gLU on line 4
Process exited with code 255.
preferences:
170.6 ms | 1387 KiB | 25 Q