Bug #61529 [Opn]: Parsing error
Edit report at https://bugs.php.net/bug.php?id=61529&edit=1
ID: 61529
User updated by: asserte at gmail dot com
Reported by: asserte at gmail dot com
Summary: Parsing error
Status: Open
Type: Bug
-Package: *Compile Issues
+Package: Scripting Engine problem
Operating System: Debian
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Move to SE problems
Previous Comments:
------------------------------------------------------------------------
[2012-03-27 13:45:26] asserte at gmail dot com
Description:
------------
isset() && unset()
PHP Parse error: syntax error, unexpected 'unset' (T_UNSET), expecting ')' in
/tmp/isset.php on line 4
Tested on PHP 5.4.0-3 (cli) (built: Mar 22 2012 07:59:57)
Test script:
---------------
$> cat /tmp/isset.php
1 <?php
2
3 $entity = array('id' => 1, 'name' => 'example');
4 isset( $entity['id'] ) && unset( $entity['id'] );
$> php /tmp/isset.php
PHP Parse error: syntax error, unexpected 'unset' (T_UNSET), expecting ')' in
/tmp/isset.php on line 3
Expected result:
----------------
unset should works.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61529&edit=1
Thread (15 messages)
- asserte at gmail dot com
- asserte at gmail dot comBug #61529 [Opn]: Parsing error
- yohgaki@php.netBug #61529 [Opn->Ver]: Parsing error
- laruence@php.netBug #61529 [PATCH]: Parsing error
- laruence@php.netBug #61529 [Com]: Parsing error
- laruence@php.netBug #61529 [PATCH]: Parsing error
- laruence@php.netBug #61529 [Ver]: Parsing error
- reeze dot xia at gmail dot comBug #61529 [Com]: Parsing error
- nikic@php.netBug->Req #61529 [Ver]: Make unset() an expression
- laruence@php.netReq #61529 [Ver]: Make unset() an expression
- laruence@php.netReq #61529 [Ver]: Make unset() an expression
- laruence@php.netBug #61529 [Ver]: Parsing error while use unset with boolean and
- dmitry@php.netReq #61529 [Ver->Fbk]: Make unset() an expression
- jelle dot zijlstra at gmail dot comReq #61529 [Com]: Make unset() an expression
- php-bugs at lists dot php dot netReq #61529 [Fbk->NoF]: Make unset() an expression