1--TEST--
2Test dechex() - basic function dechex()
3--FILE--
4<?php
5$values = array(10,
6                3950.5,
7                3.9505e3,
8                03,
9                0x5F,
10                "10",
11                "3950.5",
12                "3.9505e3",
13                "039",
14                "0x5F",
15                true,
16                false,
17                );
18
19foreach ($values as $value) {
20    try {
21        var_dump(dechex($value));
22    } catch (TypeError $exception) {
23        echo $exception->getMessage() . "\n";
24    }
25}
26
27?>
28--EXPECTF--
29string(1) "a"
30
31Deprecated: Implicit conversion from float 3950.5 to int loses precision in %s on line %d
32string(3) "f6e"
33
34Deprecated: Implicit conversion from float 3950.5 to int loses precision in %s on line %d
35string(3) "f6e"
36string(1) "3"
37string(2) "5f"
38string(1) "a"
39
40Deprecated: Implicit conversion from float-string "3950.5" to int loses precision in %s on line %d
41string(3) "f6e"
42
43Deprecated: Implicit conversion from float-string "3.9505e3" to int loses precision in %s on line %d
44string(3) "f6e"
45string(2) "27"
46dechex(): Argument #1 ($num) must be of type int, string given
47string(1) "1"
48string(1) "0"
49