Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NumericLiteral.php

NumericLiteral::$forms

Numeric forms conversion rules

Type: array

File

vendor/mck89/peast/lib/Peast/Syntax/Node/NumericLiteral.php, line 61

Class

NumericLiteral
A node that represents a numeric literal.

Namespace

Peast\Syntax\Node

Code

protected $forms = array(
    "b" => array(
        "check" => "/^0b[01]+[01_]*\$/i",
        "conv" => "bindec",
        "format" => self::BINARY,
    ),
    "o" => array(
        "check" => "/^0o[0-7]+[0-7_]*\$/i",
        "conv" => "octdec",
        "format" => self::OCTAL,
    ),
    "x" => array(
        "check" => "/^0x[0-9a-f]+[0-9a-f_]*\$/i",
        "conv" => "hexdec",
        "format" => self::HEXADECIMAL,
    ),
);
RSS feed
Powered by Drupal