11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 • <strong>PHP</strong> BASICSwww.it-ebooks.infoTable 3-12. Binary RepresentationsDecimal IntegerBinary Representation2 105 10110 101012 1100145 100100011,452,012 101100010011111101100The bitwise operators listed in Table 3-13 are variations on some of the logical operators but canresult in drastically different outcomes.Table 3-13. Bitwise OperatorsExample Label Outcome$a & $b AND And together each bit contained in $a and $b$a | $b OR Or together each bit contained in $a and $b$a ^ $b XOR Exclusive—or together each bit contained in $a and $b~ $b NOT Negate each bit in $b$a > $b Shift right $a will receive the value of $b shifted right two bitsIf you are interested in learning more about binary encoding and bitwise operators and why they areimportant, check out Randall Hyde’s massive online reference, “The Art of Assembly LanguageProgramming,” available at http://webster.cs.ucr.edu.String InterpolationTo offer developers the maximum flexibility when working with string values, <strong>PHP</strong> offers a means forboth literal and figurative interpretation. For example, consider the following string:The $animal jumped over the wall.\n74

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!