|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33318 throw 1; results in Invalid opcode 108/1/8
Submitted: 2005-06-12 22:45 UTC Modified: 2005-06-16 16:46 UTC
From: pornel at despammed dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-06-16 OS: *
Private report: No CVE-ID: None
 [2005-06-12 22:45 UTC] pornel at despammed dot com
throw NULL; throw 1; and probably all non-object throws result in "Invalid Opcode" errors.

if PHP isn't supposed to allow throwing of scalar values, error should be more precise.

Reproduce code:
function ERR() {throw 'x';}

Expected result:
C++-like throwing of anything or parse error.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-13 10:32 UTC]
Please try using this CVS snapshot:
For Windows:

I can not reproduce (the "script" you gave isn't really complete, is it?)

 [2005-06-16 14:43 UTC] pornel at despammed dot com
throw 1;
results in:
Fatal error: Invalid opcode 108/1/8. in c:\www\test.php5 on line 2

using PHP Version 5.1.0-dev Build Date Jun 15 2005 04:17:08 installed on Win32 Apache/1.3.33 as CGI.
 [2005-06-16 15:33 UTC]
Dmitry, please check this out. (I can reproduce with latest CVS)

 [2005-06-16 16:46 UTC]
Fixed in CVS HEAD.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 08:01:25 2019 UTC