Annotation of embedaddon/php/tests/lang/019.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: eval() test
3: --FILE--
4: <?php
5:
6: eval("function test() { echo \"hey, this is a function inside an eval()!\\n\"; }");
7:
8: $i=0;
9: while ($i<10) {
10: eval("echo \"hey, this is a regular echo'd eval()\\n\";");
11: test();
12: $i++;
13: }
14:
15: eval('-');
16: --EXPECTF--
17: hey, this is a regular echo'd eval()
18: hey, this is a function inside an eval()!
19: hey, this is a regular echo'd eval()
20: hey, this is a function inside an eval()!
21: hey, this is a regular echo'd eval()
22: hey, this is a function inside an eval()!
23: hey, this is a regular echo'd eval()
24: hey, this is a function inside an eval()!
25: hey, this is a regular echo'd eval()
26: hey, this is a function inside an eval()!
27: hey, this is a regular echo'd eval()
28: hey, this is a function inside an eval()!
29: hey, this is a regular echo'd eval()
30: hey, this is a function inside an eval()!
31: hey, this is a regular echo'd eval()
32: hey, this is a function inside an eval()!
33: hey, this is a regular echo'd eval()
34: hey, this is a function inside an eval()!
35: hey, this is a regular echo'd eval()
36: hey, this is a function inside an eval()!
37:
1.1.1.2 ! misho 38: Parse error: syntax error, unexpected %s in %s019.php(12) : eval()'d code on line 1
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>