Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5562e70960
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.432 kb
<?php
printf("%01.2f\n", multiply2(3, 4));
printf("%01.2f\n", multiply2(3.2, 4));
printf("%01.2f\n", multiply2(3.2, 4.2));
try {
multiply2('foo', 4.2);
} catch (Exception $exc) {
echo $exc->getMessage() . "\n";
}
try {
multiply2(3.2, 'foo');
} catch (Exception $exc) {
echo $exc->getMessage() . "\n";
}
// expects:
// 12.00
// 12.80
// 13.44
// Wrong type for first argument.
// Wrong type for second argument.
?>
Jump to Line
Something went wrong with that request. Please try again.