summaryrefslogtreecommitdiff
path: root/test/scanners/php/labels.in.php
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
committermurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
commit432aeb74d5a49e6f0efd1063113cef099c93aef6 (patch)
treef300ae05c2418721ea188ca1acc763cff06e71b7 /test/scanners/php/labels.in.php
parent1982b2bf7e7bfa333838cf2f3e7613c00d2a67c3 (diff)
downloadcoderay-432aeb74d5a49e6f0efd1063113cef099c93aef6.tar.gz
Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to trunk.
Diffstat (limited to 'test/scanners/php/labels.in.php')
-rw-r--r--test/scanners/php/labels.in.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/scanners/php/labels.in.php b/test/scanners/php/labels.in.php
new file mode 100644
index 0000000..2839ecd
--- /dev/null
+++ b/test/scanners/php/labels.in.php
@@ -0,0 +1,34 @@
+<?php
+goto a;
+echo 'Foo';
+
+a:
+echo 'Bar';
+?>
+
+<?php
+
+$headers = Array('subject', 'bcc', 'to', 'cc', 'date', 'sender');
+$position = 0;
+
+hIterator: {
+
+ $c = 0;
+ echo $headers[$position] . PHP_EOL;
+
+ cIterator: {
+ echo ' ' . $headers[$position][$c] . PHP_EOL;
+
+ if(!isset($headers[$position][++$c])) {
+ goto cIteratorExit;
+ }
+ goto cIterator;
+ }
+
+ cIteratorExit: {
+ if(isset($headers[++$position])) {
+ goto hIterator;
+ }
+ }
+}
+?> \ No newline at end of file