Commits ------- f3408cc [Finder] Avoid unnecessary use of the @ operator Discussion ---------- [Finder] Avoid unnecessary use of the @ operator Tests are passing --------------------------------------------------------------------------- by stof at 2012-04-08T17:42:01Z Does PHP really throw an exception on failure or is it only the case when an error handler converts a warning to an exception ? It would be weird given the small amount of cases where PHP uses exceptions. --------------------------------------------------------------------------- by Seldaek at 2012-04-08T17:43:51Z ``` $ php -r 'new DateTime("foo");' Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (foo) at position 0 (f): The timezone could not be found in the database' in Command line code on line 1 ``` --------------------------------------------------------------------------- by Seldaek at 2012-04-08T17:45:09Z In a constructor it's pretty hard to return false, so it has to throw an exception. The php.net docs also say it so I'm fairly sure it's nothing specific to my setup.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|