1--TEST--
2Test base_convert() function :  error conditions - incorrect input
3--FILE--
4<?php
5echo "*** Testing base_convert() : error conditions ***\n";
6
7// get a class
8class classA
9{
10}
11
12try {
13    base_convert(1234, 1, 10);
14} catch (ValueError $e) {
15    echo $e->getMessage(), "\n";
16}
17try {
18    base_convert(1234, 10, 37);
19} catch (ValueError $e) {
20    echo $e->getMessage(), "\n";
21}
22
23try {
24    base_convert(new classA(), 8, 10);
25} catch (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28
29?>
30--EXPECT--
31*** Testing base_convert() : error conditions ***
32base_convert(): Argument #2 ($from_base) must be between 2 and 36 (inclusive)
33base_convert(): Argument #3 ($to_base) must be between 2 and 36 (inclusive)
34base_convert(): Argument #1 ($num) must be of type string, classA given
35