summaryrefslogtreecommitdiff
path: root/Zend/tests/declare_003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/declare_003.phpt')
-rw-r--r--Zend/tests/declare_003.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/declare_003.phpt b/Zend/tests/declare_003.phpt
new file mode 100644
index 0000000..2980f75
--- /dev/null
+++ b/Zend/tests/declare_003.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Testing declare statement with several type values
+--INI--
+precision=15
+zend.multibyte=1
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 11111111111111);
+declare(encoding = NULL);
+declare(encoding = M_PI);
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [1] in %sdeclare_003.php on line %d
+
+Warning: Unsupported encoding [11111111111111] in %sdeclare_003.php on line %d
+
+Warning: Unsupported encoding [] in %sdeclare_003.php on line %d
+
+Fatal error: Cannot use constants as encoding in %sdeclare_003.php on line %d