xref: /PHP-8.2/Zend/tests/declare_002.phpt (revision 74859783)
1--TEST--
2Testing declare statement with several type values
3--EXTENSIONS--
4mbstring
5--INI--
6zend.multibyte=1
7--FILE--
8<?php
9
10declare(encoding = 1);
11declare(encoding = 1123131232131312321);
12declare(encoding = 'utf-8');
13declare(encoding = M_PI);
14
15print 'DONE';
16
17?>
18--EXPECTF--
19Warning: Unsupported encoding [%d] in %sdeclare_002.php on line 3
20
21Warning: Unsupported encoding [%f] in %sdeclare_002.php on line 4
22
23Fatal error: Encoding must be a literal in %sdeclare_002.php on line 6
24