* Test the PHP Parser with different PHP snippets
*/
public void testPHPParser() {
+ checkPHP("$a = $$tata;", true);
+ checkPHP("$$tata=2;", true);
checkPHP("$tata;", true);
checkPHP("$tata = &new Tutu;", true);
checkPHP("$tata = $bobo;", true);
- checkPHP("function test() {$id = $this->gogo($titi); echo $id;}", true);
+ checkPHP("function test($tutu) {$id = $this->gogo($titi); echo $id;}", true);
checkPHP("function test() { $tata = $b; echo $b;}", true);
checkPHP("function test() { echo $b;}", true);
+ checkPHP("for(;;) {}", true);
//checkHTML(new File("class.adm_gestuser.php"));
checkHTML("<?php $szOpenImg = \"/$location[Treeview]/images/Open.gif\"; ?>", true);
checkHTML("<?php function f($a,$b) {" +
checkHTML("\n\n\n\n <?php print \"Hello world\"?> ", true);
checkHTML("<?php phpinfo()?>", true);
checkHTML("<?php phpinfo(); ?> foo <?php phpinfo(); ?>", true);
- // checkHTML(" <?php //this is a line comment ?>",true);
+ checkHTML(" <?php //this is a line comment ?>",true);
//todo : fix this checkHTML("<?php mysql_query(\"CREATE DATABASE $DB_TABLE\" ) or print 'Error creating database<br>'; ?>",true);
checkHTML("<?php function func($a) {$v1 = $v23;}; ?>", true);
checkHTML("<?php $a = !$b; ?>", true);