Array dereferencing doesn't work
<p>I have uploaded my project to a free web server and I see this error:</p>

<pre><code>Parse error: syntax error, unexpected '[' in /home/a9243209/public_html/index.php on line 28` 
</code></pre>

<p>Line 28:</p>

<pre><code>$year = getdate(strtotime($currentDate))['year'];
</code></pre>

<p><strong>Note</strong></p>

<p>The remove server runs PHP 5.2.17. I've tried to upload my project to a server with version 5.3, but the same error shows up! Everything works just fine on my localhost (php version 5.16.0)</p>
