ID:               43486
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sbbritton911 at hotmail dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: Debian
 PHP Version:      5.2.5
 New Comment:

This has been brought up many times - it's not going to happen.


Previous Comments:
------------------------------------------------------------------------

[2007-12-03 15:42:12] sbbritton911 at hotmail dot com

Description:
------------
In using inline functions that return arrays, please make php capable
of using values stored at particular indexes.  For example,
$class->function_call()[index] or ($class->function_call())[index]. 
Basically, the same use as other langauges.

Thank you for your time.

Sincerely,

Scott B Britton

Reproduce code:
---------------
class test {
    private $scott = array("Scott", "B", "Britton");

    public function return_scott() {
        return $this->scott;
    }
}

$s = new test();

printf("%s", $s->return_scott()[0]);


Expected result:
----------------
I expected to see "Scott" printed to the screen

Actual result:
--------------
Syntax error, unexpected '['


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43486&edit=1

Reply via email to