php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14640 Support "{@$foo}" and "{@$foo['bar']}" syntax
Submitted: 2001-12-21 08:21 UTC Modified: 2012-05-24 03:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: mfischer at guru dot josefine dot at Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.1.0 OS: Any
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: mfischer at guru dot josefine dot at
New email:
PHP Version: OS:

 

 [2001-12-21 08:21 UTC] mfischer at guru dot josefine dot at
$ php -q
<? error_reporting(E_ALL);
echo "{@$array['key']}"; ?>
<br />
<b>Parse error</b>:  parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in <b>-</b> on line <b>2</b><br />
-(2) : Parse error - parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'

$ php -q
<? error_reporting(E_ALL);
echo "{@$foo}\n";
?>
<br />
<b>Warning</b>:  Undefined variable:  foo in <b>-</b> on line <b>2</b><br />
-(2) : Warning - Undefined variable:  foo
{@}

Would be nice to support the @ operator in those cases too.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-11 16:10 UTC] destes at ix dot netcom dot com
what sorts of errors aren't being suppressed now?  If the variable doesn't exist, nothing is output, and in a function context, FALSE is returned.  I don't see the need... perhaps you could explain it?
 [2010-12-29 11:59 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: Scripting Engine problem
 [2010-12-29 11:59 UTC] jani@php.net
Hell no, rather get rid of @ altogether.
 [2012-05-24 02:01 UTC] lijingyan922 at gmail dot com
Your blog is very informative and useful. You have written it very well. I have 
bookmarked your blog. Your blog written in very good, I like it very much, I will 
often come to.Thank you to let me see your blog, I love you blog style, very 
cool.Your blog too good, I will soon come back again, to keep at it.Your website 
is very beautiful, you do something great!!Your essay is good, I like it very 
much. Excellent Blog! I really admire your thinking and the way you have put these 
information in this post.
 [2022-01-29 12:40 UTC] dsnou849 at gmail dot com
Thanks for the post, I'll try to sort this out later when I've handed in all my essays and dissertations because my study is starting to piss me off. I will most likely seek help from uk coursework help https://www.essaygeeks.co.uk/coursework/ who will help me with my written work, I want to quickly deal with this problem
 [2022-02-09 13:16 UTC] linajulie09 at gmail dot com
Amazing code info. You can find and book cheap flights tickets and best holiday packages here: https://dreamworldtravel.co.uk
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 03:05:53 2022 UTC