1--TEST--
2Test return type and value for expected input deg2rad()
3--INI--
4precision = 14
5--FILE--
6<?php
7/*
8 * Function is implemented in ext/standard/math.c
9*/
10
11$file_path = __DIR__;
12require($file_path."/allowed_rounding_error.inc");
13
14$arg_0 = 0.0;
15$arg_1 = 90.0;
16$arg_2 = 180.0;
17$arg_3 = 360.0;
18
19
20echo "deg2rad $arg_0 = ";
21$r0 = deg2rad($arg_0);
22var_dump($r0);
23if (allowed_rounding_error($r0 ,0 )) {
24    echo "Pass\n";
25}
26else {
27    echo "Fail\n";
28}
29
30echo "deg2rad $arg_1 = ";
31$r1 = deg2rad($arg_1);
32var_dump($r1);
33if (allowed_rounding_error($r1 ,1.5707963267949 )) {
34    echo "Pass\n";
35}
36else {
37    echo "Fail\n";
38}
39echo "deg2rad $arg_2 = ";
40$r2 = deg2rad($arg_2);
41var_dump($r2);
42if (allowed_rounding_error($r2 ,3.1415926535898 )) {
43    echo "Pass\n";
44}
45else {
46    echo "Fail\n";
47}
48echo "deg2rad $arg_3 = ";
49$r3 = deg2rad($arg_3);
50var_dump($r3);
51if (allowed_rounding_error($r3 ,6.2831853071796 )) {
52    echo "Pass\n";
53}
54else {
55    echo "Fail\n";
56}
57?>
58--EXPECTF--
59deg2rad 0 = float(%f)
60Pass
61deg2rad 90 = float(%f)
62Pass
63deg2rad 180 = float(%f)
64Pass
65deg2rad 360 = float(%f)
66Pass
67