summaryrefslogtreecommitdiff
path: root/Zend/tests/declare_002.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-11-24 05:41:23 +0000
committerDmitry Stogov <dmitry@php.net>2010-11-24 05:41:23 +0000
commitab93d8c621645e05d6a6a431d52ac64eda956673 (patch)
tree07d6d54e462b85b20fed1a91097ef908da48fb1c /Zend/tests/declare_002.phpt
parent011fd8059d7e8e0ea9a70bc86d817e942dcbb238 (diff)
downloadphp-git-ab93d8c621645e05d6a6a431d52ac64eda956673.tar.gz
Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini
Diffstat (limited to 'Zend/tests/declare_002.phpt')
-rw-r--r--Zend/tests/declare_002.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/declare_002.phpt b/Zend/tests/declare_002.phpt
new file mode 100644
index 0000000000..1babdf338b
--- /dev/null
+++ b/Zend/tests/declare_002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Testing declare statement with several type values
+--SKIPIF--
+<?php
+if (!ini_get("zend.multibyte")) {
+ die("skip Requires zend.multibyte=1");
+}
+?>
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 1123131232131312321);
+declare(encoding = NULL);
+declare(encoding = 'utf-8');
+declare(encoding = M_PI);
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [%d] in %sdeclare_002.php on line 3
+
+Warning: Unsupported encoding [%f] in %sdeclare_002.php on line 4
+
+Warning: Unsupported encoding [] in %sdeclare_002.php on line 5
+
+Fatal error: Cannot use constants as encoding in %sdeclare_002.php on line 7