php.net |  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
Votes:519
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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))
#else
#define assert(a)
#endif

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-21 03:34 UTC] cynic@php.net
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] nikic@php.net
-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] nikic@php.net
PHP 7 supports disabling evaluation of assertions: https://wiki.php.net/rfc/expectations
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC