This won't fit into "loosely-typed" PHP, and will lead to writing - sin((float)$x). We have this in PHP sources :) (in C)
Thanks. Dmitry. On Wed, Feb 4, 2015 at 12:31 PM, Sebastian Bergmann <sebast...@php.net> wrote: > Am 04.02.2015 um 10:25 schrieb Dmitry Stogov: > > Do you like the proposal with declare() switch? > > No, I do not like that. > > We are talking about adding support for scalars (string, integer, ...) > to the list of optional type declarations already supported (array, > callable, interface name, class name) by PHP. When a developer chooses > to use a scalar type in the signature of a function or method then it > should be enforced as strictly as the already supported types. It should > be up the caller to perform explicit type casting when required. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >