1--TEST--
2Test strnatcasecmp() function : variation
3--CREDITS--
4Felix De Vliegher <felix.devliegher@gmail.com>
5--FILE--
6<?php
7/* Preparation */
8class a
9{
10    function __toString()
11    {
12        return "Hello WORLD";
13    }
14}
15
16class b
17{
18    function __toString()
19    {
20        return "HELLO world";
21    }
22}
23
24$a = new a();
25$b = new b();
26
27function str_dump($a, $b) {
28    var_dump(strnatcasecmp($a, $b));
29}
30
31echo "*** Testing strnatcasecmp() : variation ***\n";
32
33str_dump('0', false);
34str_dump('fooBar', '');
35str_dump('', -1);
36str_dump("Hello\0world", "Helloworld");
37str_dump("\x0", "\0");
38str_dump($a, $b);
39
40?>
41--EXPECT--
42*** Testing strnatcasecmp() : variation ***
43int(1)
44int(1)
45int(-1)
46int(-1)
47int(0)
48int(0)
49