|  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
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:
26 + 39 = ?
Subscribe to this entry?

 [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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jan 27 05:04:15 2023 UTC