|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69929 EngineExceptions broken in alpha 2
Submitted: 2015-06-25 08:16 UTC Modified: 2015-06-25 09:00 UTC
From: cameron dot adam+php at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 7.0.0alpha1 OS: Windows 7 64-bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 + 37 = ?
Subscribe to this entry?

 [2015-06-25 08:16 UTC] cameron dot adam+php at gmail dot com
See code.

On alpha 1 this returns "EngineException caught".

On alpha 2 it returns:

Fatal error: Uncaught TypeError: Argument 1 passed to takesInt() must be of the type integer, string given

I suspect it's something to do with the new Throwable support, at a guess.

This is the first bug I've raised, so lemme know if I've done it wrong,or you need more info. Cheers.

Test script:
try {
    function takesInt(int $x){
        return true;

    takesInt('not an int');
} catch(EngineException $e) {
	echo 'EngineException caught<br>';


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-25 08:39 UTC]
-Status: Open +Status: Not a bug
 [2015-06-25 08:39 UTC]
sorry for that, but we changed the exception inheritance recently ,please read the "
Changes to error handling" section in:
 [2015-06-25 09:00 UTC] cameron dot adam+php at gmail dot com
Gotcha. So what was an EngineException yesterday is a TypeError today (and tested that, and it works fine). Cheers.

PS: you do not have "alpha 2" as an option in the dropdown when raising a new bug. Forgot to mention that before.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 04:03:49 2023 UTC