|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76501 Funny message with fatal error
Submitted: 2018-06-19 15:52 UTC Modified: 2018-07-04 01:04 UTC
From: Assigned: kalle (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 7.3.0alpha1 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2018-06-19 15:52 UTC]
Here are two examples of Fatal error, that bears a funny error message.

<?php break 1.0;
PHP Fatal error:  'break' operator accepts only positive numbers

<?php break true;
'break' operator with non-constant operand is no longer supported

Test script:
<?php break 1.0;

Those are two separate scripts. 

<?php break true;

<?php const A=1; break A;
PHP Fatal error:  'break' operator with non-constant operand is no longer supported

Expected result:
"only positive numbers" is misleading, and should mention 'only positive integers'.

That would work for "true", and "A" too : "non-constant operand" is misleading too. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-04 01:04 UTC]
Automatic comment on behalf of kalle
Log: Fixed bug #76501 (Funny message with fatal error)
 [2018-07-04 01:04 UTC]
-Status: Open +Status: Closed
 [2018-07-04 01:04 UTC]
-Assigned To: +Assigned To: kalle
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 14:05:53 2022 UTC