php man page for numfmt_parse

Query: numfmt_parse

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

NUMFMT_PARSE(3) 							 1							   NUMFMT_PARSE(3)

NumberFormatter::parse - Parse a number

	Object oriented style

SYNOPSIS
public mixed NumberFormatter::parse (string $value, [int $type], [int &$position])
DESCRIPTION
Procedural style mixed numfmt_parse (NumberFormatter $fmt, string $value, [int $type], [int &$position]) Parse a string into a number using the current formatter rules.
PARAMETERS
o $fmt -NumberFormatter object. o $type - The formatting type to use. By default, NumberFormatter::TYPE_DOUBLE is used. o $position - Offset in the string at which to begin parsing. On return, this value will hold the offset at which parsing ended.
RETURN VALUES
The value of the parsed number or FALSE on error.
EXAMPLES
Example #1 numfmt_parse(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); $num = "1.234.567,891"; echo numfmt_parse($fmt, $num)." "; echo numfmt_parse($fmt, $num, NumberFormatter::TYPE_INT32)." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); $num = "1.234.567,891"; echo $fmt->parse($num)." "; echo $fmt->parse($num, NumberFormatter::TYPE_INT32)." "; ?> The above example will output: 1234567.891 1234567
SEE ALSO
numfmt_get_error_code(3), numfmt_format(3), numfmt_parse_currency(3). PHP Documentation Group NUMFMT_PARSE(3)
Related Man Pages
numfmt_create(3) - php
numfmt_format(3) - php
numfmt_set_pattern(3) - php
numfmt_set_symbol(3) - php
numfmt_set_text_attribute(3) - php
Similar Topics in the Unix Linux Community
for command
echo not echoing correctly
Search and Parse string from inside a File
how do you parse 1 line at a time of file1 ie. line(n) each line into new file
parse a mixed alphanumeric string from within a string