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