Using braces and semicolons

Author Topic: Using braces and semicolons  (Read 792 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 139
  • Karma: 0
    • No Addiction
Using braces and semicolons
« on: 05-21-2016, 06:05:20 »
Like ActionScript, PHP consists of a series of statements normally executed in the sequence they appear in the script (unless the statements are inside a function, in which case both languages wait until the function is called before executing them). Each statement in PHP must be followed by a semicolon.

Statements can be grouped together between curly braces ({}), for example when you create a conditional test, loop, or function. Although ActionScript recommends a semicolon after the closing curly brace of an anonymous function, you should never use a semicolon after a closing curly brace in PHP.