Obscure PHP5 information

  • <?= $variable ?> is depreciated in PHP5 (along w/ all other tags that are not <?php ?>).  I don’t care so much about the others, but I actually use this one.  <?= $title ?> just makes more sense than <?php echo $title; ?>
  • The last instruction before a closing tag does not require a semicolon; however, this is probably a bug in the PHP parser and you should always terminate it anyway. Perhaps <?= $variable ?> should actually be <?= $variable; ?>.
  • use BCMath functions for precision math.  This isn’t really obscure, but every now and then I run into people that have never heard of it, so it makes the list.
  • Referring to a variable by-reference is slower than referring to a variable by-value (&$a vs. $a)
  • more to come….

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">