Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bug

A bug is a discrepancy between the expected result of a program and its actual result.

Bugs have many different varieties:

  • Code does not compile
  • Program stops before completing, with a ‘Fatal error’
  • Program outputs a wrong result
  • Program outputs a result different from expected
  • Program is vulnerable to security attack
  • Poor performance.
<?php

// a case of syntax error
// echo hello world; 

echo -3 ** 2; // known bug

?>

Documentation

See Also