1--TEST--
2Test strnatcasecmp() function : basic functionality
3--CREDITS--
4Felix De Vliegher <felix.devliegher@gmail.com>
5--FILE--
6<?php
7/* Prototype  : int strnatcasecmp(string s1, string s2)
8 * Description: Returns the result of case-insensitive string comparison using 'natural' algorithm
9 * Source code: ext/standard/string.c
10 * Alias to functions:
11 */
12
13function str_dump($one, $two) {
14	var_dump(strnatcasecmp($one, $two));
15}
16
17echo "*** Testing strnatcasecmp() : basic functionality ***\n";
18
19// Calling strnatcasecmp() with all possible arguments
20str_dump('A', 'a');
21str_dump('a10', 'A20');
22str_dump('A1b', 'a');
23str_dump('x2-y7', 'x8-y8');
24str_dump('1.010', '1.001');
25str_dump(' ab', ' aB');
26str_dump('acc ', 'acc');
27str_dump(11.5, 10.5);
28str_dump(10.5, 10.5E1);
29str_dump('Rfc822.txt', 'rfc2086.txt');
30str_dump('Rfc822.txt', 'rfc822.TXT');
31str_dump('pIc 6', 'pic   7');
32str_dump(0xFFF, 0Xfff);
33
34?>
35===DONE===
36--EXPECT--
37*** Testing strnatcasecmp() : basic functionality ***
38int(0)
39int(-1)
40int(1)
41int(-1)
42int(1)
43int(0)
44int(1)
45int(1)
46int(-1)
47int(-1)
48int(0)
49int(-1)
50int(0)
51===DONE===
52