xref: /PHP-7.4/Zend/tests/bug69092.phpt (revision d679f022)
1--TEST--
2Bug #69092 (Declare Encoding Compile Check Wrong)
3--SKIPIF--
4<?php
5if (!extension_loaded("mbstring")) {
6  die("skip Requires mbstring extension");
7}
8?>
9--INI--
10zend.multibyte=On
11--FILE--
12<?php
13echo "Hi";
14
15function foo() {
16	declare(encoding="utf-8");
17}
18
19echo "Bye"
20?>
21--EXPECTF--
22Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
23