1--TEST--
2Test quoted_printable_decode() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string quoted_printable_decode  ( string $str  )
6 * Description: Convert a quoted-printable string to an 8 bit string
7 * Source code: ext/standard/string.c
8*/
9
10echo "*** Testing quoted_printable_decode() : error conditions ***\n";
11
12echo "\n-- Testing quoted_printable_decode() function with no arguments --\n";
13var_dump( quoted_printable_decode() );
14
15echo "\n-- Testing quoted_printable_decode() function with more than expected no. of arguments --\n";
16$str = "=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A=
17=20=D4=cf=D2=C7=CF=D7=D9=C5=
18=20=
19=D0=
20=D2=CF=C5=CB=D4=D9";
21$extra_arg = 10;
22var_dump( quoted_printable_decode($str, $extra_arg) );
23
24?>
25===DONE===
26--EXPECTF--
27*** Testing quoted_printable_decode() : error conditions ***
28
29-- Testing quoted_printable_decode() function with no arguments --
30
31Warning: quoted_printable_decode() expects exactly 1 parameter, 0 given in %s on line %d
32NULL
33
34-- Testing quoted_printable_decode() function with more than expected no. of arguments --
35
36Warning: quoted_printable_decode() expects exactly 1 parameter, 2 given in %s on line %d
37NULL
38===DONE===
39