This is just a question of curiosity... I'm wondering if accessing function returned arrays in this method is valid. In this example, I'm using the pathinfo() resulting array.
pathinfo($file)['dirname'];
Or, is it required to set pathinfo() to a variable first and then access it. (The classic method):
$info = pathinfo($file);
$info['dirname'];
I know the classic method is valid, however i'm just curious if the first method is valid too. I've tested it with the latest version of WAMP, and it worked, however Dreamweaver CS5 calls it a syntax error.