Doc #51317 [NEW]: Errors/Exceptions section is incorrect

From: Date: Thu, 18 Mar 2010 06:03:53 +0000
Subject: Doc #51317 [NEW]: Errors/Exceptions section is incorrect
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4057@lists.php.net to get a copy of this message
From: Operating system: PHP version: 5.2.13 Package: Documentation problem Bug Type: Documentation Problem Bug description:Errors/Exceptions section is incorrect Description: ------------ The section states that "Emits Exception in case of an error." but fails to mention that this behavior only applies to PHP 5 >= 5.3.0. If 5.2, DateTime::__construct triggers an error, not an exception. Test script: --------------- <?php set_error_handler('dummy'); try { $date = new DateTime('not a date'); } catch (Exception $e) { die("\ncaught exception"); } die("\ndying"); function dummy() { echo "\ndummy function"; } ?> Expected result: ---------------- "caught exception" Actual result: -------------- "dummy" -- Edit bug report at http://bugs.php.net/bug.php?id=51317&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51317&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51317&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51317&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51317&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51317&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51317&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51317&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51317&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51317&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51317&r=support Expected behavior: http://bugs.php.net/fix.php?id=51317&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51317&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51317&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51317&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51317&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51317&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51317&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51317&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51317&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51317&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51317&r=mysqlcfg

« previous php.doc.bugs (#4057) next »