I just narrowed down one of these strange errors that just occurs at certain environments.
The code below parses ok on my linux php 5.3.6 default install, on windows php 5.4.3 default install but fails on some of the windows machines we have with Windows php 5.3.6.
The message we get is:
Parse error: syntax error, unexpected '}' in C:\bogus.php on line 7
The line 7 is the "}".
I can only think this error is caused by a php.ini setting. Does anybody know what the problem is?
<?php
if(!empty($data['foo'])) {
?>
<div>
<?=$data['bar'];if(!empty($data['foo'])) {?> (Foo: <?=$data['foo'];?>) <?php }?></div>
<?php
}
?>