|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6927 Ability to disable assert() for releases
Submitted: 2000-09-28 22:17 UTC Modified: 2015-08-28 21:11 UTC
Avg. Score:1.1 ± 0.4
Reproduced:2 of 14 (14.3%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: rbaron at imake dot com Assigned: nikic (profile)
Status: Closed Package: *General Issues
PHP Version: 4.0.2 OS:
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:
From: rbaron at imake dot com
New email:
PHP Version: OS:


 [2000-09-28 22:17 UTC] rbaron at imake dot com
make the define able to replace the function names, ie.

#if debug
#define assert(a) (doAssert(a))
#define assert(a)

This way, when code is released, the functions that aid in debugging the application never get called.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-21 03:34 UTC]
you can turn assertions on/off using assert_options() / .ini settings

Personally, I would kill for macros, but I don't think we'll see them in PHP in close future.
 [2015-08-28 21:11 UTC]
-Summary: +Summary: Ability to disable assert() for releases -Status: Suspended +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: nikic
 [2015-08-28 21:11 UTC]
PHP 7 supports disabling evaluation of assertions:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 06:01:34 2024 UTC