Subversion Repositories Applications.framework

Rev

Rev 5 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 aurelien 1
<?php
2
 
3
define('VALID_NAME', true);
4
define('invalidName', true);
5
define("VALID_NAME", true);
6
define("invalidName", true);
7
 
8
class TestClass extends MyClass, YourClass
9
{
10
 
11
    const const1 = 'hello';
12
    const CONST2 = 'hello';
13
 
14
    function test()
15
    {
16
        echo constant('VALID_NAME');
17
        echo VALID_NAME;
18
        print VALID_NAME;
19
        echo(VALID_NAME);
20
        print(VALID_NAME);
21
        echo constant('invalidName');
22
        echo invalidName;
23
        print invalidName;
24
        echo(invalidName);
25
        print(invalidName);
26
 
27
        echo constant("VALID_NAME");
28
        echo constant("invalidName");
29
 
30
        echo 'Hello', VALID_NAME;
31
        echo 'Hello', invalidName;
32
 
33
        // These might look like constants to
34
        // poorly written code.
35
        echo 'Hello there';
36
        echo "HELLO";
37
        echo 'HELLO';
38
        print 'Hello there';
39
        print "HELLO";
40
        print 'HELLO';
41
    }
42
 
43
    function myFunc(PHP_CodeSniffer &$blah) {}
44
    function myFunc(PHP_CodeSniffer $blah) {}
45
 
46
}
47
 
48
interface MyInterface
49
{
50
}
51
 
52
if (($object instanceof Some_Class) === false) {
53
    $var = <<<EOF
54
This is some heredoc text.
55
This is some heredoc text.
56
This is some heredoc text.
57
 
58
This is some heredoc text.
59
This is some heredoc text.
60
This is some heredoc text.
61
EOF;
62
}
63
 
64
$var = <<<EOF
65
This is some heredoc text.
66
This is some heredoc text.
67
This is some heredoc text.
68
 
69
This is some heredoc text.
70
This is some heredoc text.
71
This is some heredoc text.
72
EOF;
73
 
74
throw new InvalidSomethingException;
75
 
76
declare(ticks = 1) {
77
    foreach ($var as $bit) {
78
        echo $bit;
79
    }
80
}
81
 
82
$binary = (binary) $string;
83
?>