php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7513 unset not allowed in ?-if or an or
Submitted: 2000-10-28 08:09 UTC Modified: 2000-10-30 09:47 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (28/10/2000) OS: linux
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: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [2000-10-28 08:09 UTC] wico at cnh dot nl
Strange parser thingy:

// this is allowed
if ($skip_name) {
	unset($data[id], $data[name]);
} else {
	unset($data[id]);
}

// this gives parse error:
	$skip_name ? unset($data[id]) : unset($data[id], $data[name]);

$plop OR unset($plop) also makes parser unhappy

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-30 09:47 UTC] stas@php.net
unset is not a function, so you cannot use it in an expression.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 00:01:27 2024 UTC