]> granicus.if.org Git - php/commitdiff
- New test
authorFelipe Pena <felipe@php.net>
Tue, 11 Nov 2008 16:12:18 +0000 (16:12 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 11 Nov 2008 16:12:18 +0000 (16:12 +0000)
Zend/tests/declare_001.phpt [new file with mode: 0644]

diff --git a/Zend/tests/declare_001.phpt b/Zend/tests/declare_001.phpt
new file mode 100644 (file)
index 0000000..dcd10ba
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Testing declare statement with several type values
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 1.2);
+declare(encoding = NULL);
+declare(encoding = M_PI);
+declare(encoding = 'utf-8');
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [1] in %s on line %d
+
+Warning: Unsupported encoding [1.2] in %s on line %d
+
+Warning: Unsupported encoding [] in %s on line %d
+
+Fatal error: Cannot use constants as encoding in %s on line %d