Function __global->js_pos_to_line_details
Definitions
sources/webstandards_js_lex.php
- Convert a position to a triplet of details about the line it is on.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $i | integer | No | No | required parameter | N/A | N/A | The position |
| $absolute | boolean | No | No | False | N/A | N/A | Whether the position is a string offset (as opposed to a token position) |
Returns
- The quartet of details (line offset, line number, the line, the absolute position)
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Convert a position to a triplet of details about the line it is on.
*
* @param integer $i The position
* @param boolean $absolute Whether the position is a string offset (as opposed to a token position)
* @return array The quartet of details (line offset, line number, the line, the absolute position)
*/
function js_pos_to_line_details(int $i, bool $absolute = false) : array
* Convert a position to a triplet of details about the line it is on.
*
* @param integer $i The position
* @param boolean $absolute Whether the position is a string offset (as opposed to a token position)
* @return array The quartet of details (line offset, line number, the line, the absolute position)
*/
function js_pos_to_line_details(int $i, bool $absolute = false) : array
