Bug

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

Bugs have many different varieties:

  • Code does not compile

  • Program stop before complete, 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

?>

See also Modern PHP Security Part 1: bug classes.

Related : Linting, Strpos() Syndrome