/hphp/test/zend/good/ext/standard/tests/math/ceil_error.php
http://github.com/facebook/hiphop-php · PHP · 17 lines · 11 code · 2 blank · 4 comment · 0 complexity · eba4611b81bce441f6d70f75c9801a5d MD5 · raw file
- <?hh
- /* Prototype : float ceil ( float $value )
- * Description: Round fractions up.
- * Source code: ext/standard/math.c
- */
- <<__EntryPoint>> function main(): void {
- echo "*** Testing ceil() : error conditions ***\n";
- $arg_0 = 1.0;
- $extra_arg = 1;
- echo "\nToo many arguments\n";
- try { var_dump(ceil($arg_0, $extra_arg)); } catch (Exception $e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__.' on line '.__LINE__."\n"; }
- echo "\nToo few arguments\n";
- try { var_dump(ceil()); } catch (Exception $e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__.' on line '.__LINE__."\n"; }
- echo "===Done===";
- }