On Mon, Mar 16, 2015 at 2:53 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: > Hi all, > > I think this is important, but not many people realize the importance. > Therefore I created this as a new thread at the last minutes of vote. > ... > > "strict_mode" is just controlling errors, then it should be named as error > controlling directive and raise E_WARNING/E_TYPE or whatever. > > Even if what its controlling is error that can be overridden by caller, yet > calling it "strict_types" is not correct. Proper name would be something > like "raise_type_error". > > Let's see how it looks if "strict_types" is renamed to "raise_type_error" > ... > <?php > declare(raise_type_error = 1); > require "lib.php"; > foo("123"); // will give an error > ?> > I agree that the name doesn't by itself explain the feature, but how could it possibly? You'd end up with something like:
declare(raise_type_errors_on_parameter_mismatches_when_calling_functions_from_this_file_regardless_of_where_the_functions_are_defined_and_what_the_setting_is_in_other_files=1); I don't think your suggestion explains the feature any better than strict_types. (Although the irony of using =1 instead of =true isn't lost on me!) -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php