summaryrefslogtreecommitdiff
path: root/test/scanners/php/class.expected.raydebug
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanners/php/class.expected.raydebug')
-rw-r--r--test/scanners/php/class.expected.raydebug83
1 files changed, 83 insertions, 0 deletions
diff --git a/test/scanners/php/class.expected.raydebug b/test/scanners/php/class.expected.raydebug
new file mode 100644
index 0000000..bc46870
--- /dev/null
+++ b/test/scanners/php/class.expected.raydebug
@@ -0,0 +1,83 @@
+comment(<!-- from http://www.php.net/manual/en/keyword.class.php -->)
+inline_delimiter(<?php)
+reserved(class) class(Cart) operator({)
+ reserved(var) local_variable($items)operator(;) comment(// Items in our shopping cart)
+
+ comment(// Add $num articles of $artnr to the cart)
+
+ reserved(function) function(add_item)operator(()local_variable($artnr)operator(,) local_variable($num)operator(\)) operator({)
+ local_variable($this)operator(->)ident(items)operator([)local_variable($artnr)operator(]) operator(+=) local_variable($num)operator(;)
+ operator(})
+
+ comment(// Take $num articles of $artnr out of the cart)
+
+ reserved(function) function(remove_item)operator(()local_variable($artnr)operator(,) local_variable($num)operator(\)) operator({)
+ reserved(if) operator(()local_variable($this)operator(->)ident(items)operator([)local_variable($artnr)operator(]) operator(>) local_variable($num)operator(\)) operator({)
+ local_variable($this)operator(->)ident(items)operator([)local_variable($artnr)operator(]) operator(-=) local_variable($num)operator(;)
+ reserved(return) pre_constant(true)operator(;)
+ operator(}) reserved(elseif) operator(()local_variable($this)operator(->)ident(items)operator([)local_variable($artnr)operator(]) operator(==) local_variable($num)operator(\)) operator({)
+ predefined(unset)operator(()local_variable($this)operator(->)ident(items)operator([)local_variable($artnr)operator(])operator(\))operator(;)
+ reserved(return) pre_constant(true)operator(;)
+ operator(}) reserved(else) operator({)
+ reserved(return) pre_constant(false)operator(;)
+ operator(})
+ operator(})
+operator(})
+inline_delimiter(?>)
+
+
+inline_delimiter(<?php)
+reserved(class) class(Cart) operator({)
+ comment(/* None of these will work in PHP 4. */)
+ reserved(var) local_variable($todays_date) operator(=) predefined(date)operator(()string<delimiter(")content(Y-m-d)delimiter(")>operator(\))operator(;)
+ reserved(var) local_variable($name) operator(=) local_variable($firstname)operator(;)
+ reserved(var) local_variable($owner) operator(=) string<delimiter(')content(Fred )delimiter(')> operator(.) string<delimiter(')content(Jones)delimiter(')>operator(;)
+ comment(/* Arrays containing constant values will, though. */)
+ reserved(var) local_variable($items) operator(=) predefined(array)operator(()string<delimiter(")content(VCR)delimiter(")>operator(,) string<delimiter(")content(TV)delimiter(")>operator(\))operator(;)
+operator(})
+
+comment(/* This is how it should be done. */)
+reserved(class) class(Cart) operator({)
+ reserved(var) local_variable($todays_date)operator(;)
+ reserved(var) local_variable($name)operator(;)
+ reserved(var) local_variable($owner)operator(;)
+ reserved(var) local_variable($items) operator(=) predefined(array)operator(()string<delimiter(")content(VCR)delimiter(")>operator(,) string<delimiter(")content(TV)delimiter(")>operator(\))operator(;)
+
+ reserved(function) function(Cart)operator(()operator(\)) operator({)
+ local_variable($this)operator(->)ident(todays_date) operator(=) predefined(date)operator(()string<delimiter(")content(Y-m-d)delimiter(")>operator(\))operator(;)
+ local_variable($this)operator(->)ident(name) operator(=) local_variable($GLOBALS)operator([)string<delimiter(')content(firstname)delimiter(')>operator(])operator(;)
+ comment(/* etc. . . */)
+ operator(})
+operator(})
+inline_delimiter(?>)
+
+inline_delimiter(<?php)
+reserved(class) class(A)
+operator({)
+ reserved(function) function(foo)operator(()operator(\))
+ operator({)
+ reserved(if) operator(()predefined(isset)operator(()local_variable($this)operator(\))operator(\)) operator({)
+ predefined(echo) string<delimiter(')content($this is defined ()delimiter(')>operator(;)
+ predefined(echo) predefined(get_class)operator(()local_variable($this)operator(\))operator(;)
+ predefined(echo) string<delimiter(")content(\))char(\\n)delimiter(")>operator(;)
+ operator(}) reserved(else) operator({)
+ predefined(echo) string<delimiter(")content(\\$)content(this is not defined.)char(\\n)delimiter(")>operator(;)
+ operator(})
+ operator(})
+operator(})
+
+reserved(class) class(B)
+operator({)
+ reserved(function) function(bar)operator(()operator(\))
+ operator({)
+ constant(A)operator(::)ident(foo)operator(()operator(\))operator(;)
+ operator(})
+operator(})
+
+local_variable($a) operator(=) reserved(new) constant(A)operator(()operator(\))operator(;)
+local_variable($a)operator(->)ident(foo)operator(()operator(\))operator(;)
+constant(A)operator(::)ident(foo)operator(()operator(\))operator(;)
+local_variable($b) operator(=) reserved(new) constant(B)operator(()operator(\))operator(;)
+local_variable($b)operator(->)ident(bar)operator(()operator(\))operator(;)
+constant(B)operator(::)ident(bar)operator(()operator(\))operator(;)
+inline_delimiter(?>)