Why doesn't php support this syntax:
$s = explode('-', 'foo-bar')[0];
?
It's a limitation in the PHP parser. There's no reason why it can't support this form of reduction, it just doesn't.
1.4m articles
1.4m replys
5 comments
57.0k users