1--TEST--
2Test strnatcasecmp() function : variation
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
13/* Preparation */
14class a
15{
16	function __toString()
17	{
18		return "Hello WORLD";
19	}
20}
21
22class b
23{
24	function __toString()
25	{
26		return "HELLO world";
27	}
28}
29
30$a = new a();
31$b = new b();
32
33function str_dump($a, $b) {
34	var_dump(strnatcasecmp($a, $b));
35}
36
37echo "*** Testing strnatcasecmp() : variation ***\n";
38
39str_dump('0', false);
40str_dump('fooBar', '');
41str_dump('', -1);
42str_dump("Hello\0world", "Helloworld");
43str_dump("\x0", "\0");
44str_dump($a, $b);
45
46?>
47===DONE===
48--EXPECT--
49*** Testing strnatcasecmp() : variation ***
50int(1)
51int(6)
52int(-2)
53int(-1)
54int(0)
55int(0)
56===DONE===
57