Le lun. 23 févr. 2015 à 17:06, François Laupretre <franc...@php.net> a écrit :
> Hi, > > Starting the vote for https://wiki.php.net/rfc/array-to-string. > > Please note that, while the initial RFC proposed both options of either > fully supporting the feature, or disabling it, the voting choices are now : > > - either definitely disabling array to string conversion, > - or keep current behavior as-is. > > Vote ends March 6, 00:00 (UTC). > > Regards > > François > As said in the original thread [1], I'm not in favor of breaking the execution in the case of "Array to string" conversion with an E_RECOVERABLE_ERROR with no "opt-in" choice for that (which implies an important BC break). However, maybe there is a better option for those that want to be 'more "strict" and "explicit"' (quoting Pascal Martin [2]). Having the option to bail out at any kind of errors (E_NOTICE, E_WARNING,...) might fit that as well. gcc has a similar switch: "-pedantic-errors: Like -Wpedantic, except that errors are produced rather than warnings." This could be easily developed thanks to a configuration switch (off by default) or an "error_reporting"-like bit field instructing on which error level to bail out additionally. By doing so, we would let people opt-in for that kind of behaviour. Thoughts? [1] http://marc.info/?t=142470775700006 [2] http://marc.info/?l=php-internals&m=142559407125491