Search
9 results
-
Chris Stockton ·
… unnecessary checks and irrelevant errors. As I said, I see no difference that could matter to PHP programmer between '1' and 1, and I don't see why we should encourage making this difference. I know there could be very …
-
Sam Barrow ·
… even if strict type hinting is used/implemented. Maybe a type hint of mixed? Of course; we don't make type hinting necessary, just type the variable name with no type hint as you would now and no type check …
-
Andrea Faulds ·
… seems that a check for NULL is implemented for the actual parameter which is perfectly fine (done for other type hints as well) but it also checks if all members of an array are not NULL and the check returns …
-
Christian Schneider ·
… so this is not about determining truthiness, but actual conversions to a bool type, like a bool parameter, a bool return type or a bool property type. I see, so as long as there are no bool type hints for …
-
Marcus Boerger ·
… Inside of zend_parse_arg_impl, the ! gets set to char c and spec_walk gets incremented which makes the check for the null operator fail and also makes the check for arg type check the ! in the switch case …
-
Robert Silva ·
… $formatter=null) { if (isset($formatter)) return $formatter->Format($this); else return $this; } Now the argument can be made to not type hint $formatter to begin with, but I don't want to have to check that it isnt null and …
-
Andrea Faulds ·
… and autoloading, as we discovered with the Return Types RFC. I think that we’d probably support full contravariance for parameters if we could. However, we could easily support contravariance in type hint existence, as that doesn’t require subclassing …
-
keisial@gmail.com ·
… null to a parameter expecting a given class (though you can allow it). The point isn't to restrict a type hint to always be returned. The goal is to guarantee that if a value is returned, it will be …
-
RFC Return type-hint
Martin Scotta ·
… as far as error reporting is concerned. I think type checking for parameters can provide cheap and useful validation, as parameters passed in are outside the function's control. But return values? They are within the function's control, and …