php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8577 i would kill for the ability to undefine()
Submitted: 2001-01-07 13:22 UTC Modified: 2002-04-27 18:12 UTC
From: voudras at nospam dot swiftslayer dot org Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4 OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: voudras at nospam dot swiftslayer dot org
New email:
PHP Version: OS:

 

 [2001-01-07 13:22 UTC] voudras at nospam dot swiftslayer dot org
I don't know if this is impossible or extremely difficult (I assume its one of the two because this doesn't exist at the moment), but it would be very handy. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-27 14:15 UTC] jimw@php.net
if you could undefine, it wouldn't be constant.
 [2002-04-27 15:24 UTC] voudras at nospam dot swiftslayer dot org
I have to admit that the above comment comes off as an
insulting wisecrack. like im a moron for suggesting such
a feature. what would K&R say to that?

Anyway - i found a way around this PHP deficiency for now,
and i did that by creating a set of functions which maintain
an array of defined variables and respond accordinly to my
own undefine, ifdefine, constant and define functions.

cd /web/src/php4; grep -nir "undef" *;

hmm, looks like the php developers found it useful in C
 [2002-04-27 18:12 UTC] mfischer@php.net
You're on the wrong track comparing C #defines and define() in PHP. C is about compiling and running executables whereas PHP is about interpreting.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC