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                null,
18                );
19
20foreach ($values as $value) {
21    try {
22        var_dump(dechex($value));
23    } catch (TypeError $exception) {
24        echo $exception->getMessage() . "\n";
25    }
26}
27
28?>
29--EXPECT--
30string(1) "a"
31string(3) "f6e"
32string(3) "f6e"
33string(1) "3"
34string(2) "5f"
35string(1) "a"
36string(3) "f6e"
37string(3) "f6e"
38string(2) "27"
39dechex(): Argument #1 ($num) must be of type int, string given
40string(1) "1"
41string(1) "0"
42string(1) "0"
43