File: yaml_parse_spec_int.phpt

package info (click to toggle)
php-yaml 2.0.2%2B1.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 904 kB
  • sloc: ansic: 4,832; xml: 751; makefile: 1
file content (30 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Yaml 1.1 Spec - int
--SKIPIF--
<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
--FILE--
<?php
  var_dump(yaml_parse('
canonical: 685230
decimal: +685_230
octal: 02472256
hexadecimal: 0x_0A_74_AE
binary: 0b1010_0111_0100_1010_1110
sexagesimal: 190:20:30
'));
?>
--EXPECT--
array(6) {
  ["canonical"]=>
  int(685230)
  ["decimal"]=>
  int(685230)
  ["octal"]=>
  int(685230)
  ["hexadecimal"]=>
  int(685230)
  ["binary"]=>
  int(685230)
  ["sexagesimal"]=>
  int(685230)
}