TOKEN_TYPE_WHITESPACE
TOKEN_TYPE_WHITESPACE = 0
SQL Formatter is a collection of utilities for debugging SQL queries.
It includes methods for formatting, syntax highlighting, removing comments, etc.
format(String $string, boolean $highlight = true) : String
Format the whitespace in a SQL string to make it easier to read.
String | $string | The SQL string |
boolean | $highlight | If true, syntax highlighting will also be performed |
The SQL string with HTML styles and formatting wrapped in a
tag
getNextToken(String $string, array $previous = null) : Array
Return the next token and token type in a SQL string.
Quoted strings, comments, reserved words, whitespace, and punctuation are all their own tokens.
String | $string | The SQL string |
array | $previous | The result of the previous getNextToken() call |
An associative array containing the type and value of the token.