Fixing an issue with "new" property in PHP below 5.3

If you see "Parse error: syntax error, unexpected T_NEW, expecting T_STRING or T_VARIABLE or '{' or '$' in ..." the following might come handy

 

 

 











<h1>&nbsp;</h1> <div class="toc-about clearfix"> <h1><a href="http://many.at/fixingnewproperty" class="header">Fixing an issue with &quot;new&quot; property in PHP below 5.3</a></h1><p>If you see &quot;Parse error: syntax error, unexpected T_NEW, expecting T_STRING or T_VARIABLE or &#039;{&#039; or &#039;$&#039; in ...&quot; the following might come handy</p> </div><!-- class="about clearfix" --><h1>&nbsp;</h1> <div id="mysitesnoframes" class="sites_content"><ul> <li><a rel="nofollow" href="https://bugs.php.net/bug.php?id=53697" ><img src="http://www.google.com/s2/favicons?domain=bugs.php.net" width="32" height="32" /><strong>&quot;new&quot; keyword vs. call_user_func</strong>bugs.php.net</a></li> <li><a rel="nofollow" href="http://stackoverflow.com/questions/4291574/is-it-possible-to-use-new-as-a-method-name-in-php-5-3" target="_blank" ><img src="http://www.google.com/s2/favicons?domain=stackoverflow.com" width="32" height="32" /><strong>is it possible to use new as a method name in PHP 5.3?</strong>stackoverflow.com</a></li> <li><a rel="nofollow" href="http://wordpress.org/support/topic/plugin-quick-localization-quick-localisation-fatal-error" ><img src="http://www.google.com/s2/favicons?domain=wordpress.org" width="32" height="32" /><strong>ticket #1</strong>wordpress.org</a></li> <li><a rel="nofollow" href="http://wordpress.org/support/topic/plugin-quick-localization-quick-localisation-plugin-could-not-be-activated-because-it-triggered-a-fatal-error" ><img src="http://www.google.com/s2/favicons?domain=wordpress.org" width="32" height="32" /><strong>ticket #2</strong>wordpress.org</a></li> </ul></div> Your browser does not handle frames, which are required to view the sites in tabs. Please upgrade to a more modern browser.<br /><br />