I've seen people write code like this:
$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), array(300, 300), false, '');
$image_url = $image_url[0];
which seems a little ridiculous because you could just attach the [0] to the end of the first term. So I never did it in my local machine, but now when deploying to remote machines (with possibly different versions of php, I always get bugs about unexpected '['. Does php not accept accessing arrays in-place, or was there some change in some version?