On Jul 14, 2014, at 10:13, Andrea Faulds <a...@ajf.me> wrote: > We are using hack’s syntax (int, float, bool, string, no > integer/double/boolean aliases).
On 20 Jul 2014, at 14:11, Andrea Faulds <a...@ajf.me> wrote: > The patch actually warns you if you try to do this now: > > function foo(double $foo) {} > foo(1.0); > > If you use one of the non-existent aliases (double), and pass the type that > alias is supposed to hint for (a float), the error message notes you might be > looking for the actual type hint (`float`). It seems odd to me to not support the aliases. Since I can do this: $foo = (integer)$bar; I would expect to be able to do this: function foo(integer $param) {} Also, do int, float, and numeric accept numbers in octal, hex, scientific notation, etc.? I don’t believe there are any examples in the RFC that intentionally or accidentally show what happens with, say, 0x2f as a value. -- Bob Williams SVP, Software Development Newtek Business Services, Inc. “The Small Business Authority” http://www.thesba.com/ Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any). -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php