-
-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathproperty.php
More file actions
54 lines (52 loc) · 2.06 KB
/
property.php
File metadata and controls
54 lines (52 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
class Foo
{
var $var0 = 'foo';
public $var1 = 'hello ' . 'world';
public $var1_0 = 'veryVeryVeryVeryVeryLongString ' . 'veryVeryVeryVeryVeryLongString';
public $var1_1 = 'veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongString ' . 'veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongString';
public $var2 = <<<EOD
hello world
EOD;
public $var3 = 1+2;
public $var6 = myConstant;
public $var7 = array(true, false);
public $var7_1 = [true, false];
public $var7_2 = ['key' => 'value', 'other_key' => 'other_value'];
public $var7_3 = ['very_very_very_long_key' => 'very_very_very_long_value', 'very_very_very_long_other_key' => 'very_very_very_long_other_value'];
public $var8 = <<<'EOD'
hello world
EOD;
public $var9 = 11111111111111111111111111111111111111111111111111111111111111111111;
public $var10 = 'veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongString';
public $var11 = true;
public $public = 'Public';
protected $protected = 'Protected';
private $private = 'Private';
public $prop;
private static $static_property;
public static $my_static = 'foo';
static $my_static_1 = 'foo';
public static $my_public_static='bar';
static $foo; // visibility is empty
var $bar; // visibility is null
public $string = 'string
string
string';
public $string2 = 'string
string
string' . 'string
string
string';
public $string3 { get => 'string'; }
public $string13 { &get => 'string'; }
public $string4 { get => $this->string4; }
public $string5 { final get => $this->string5; }
public $string6 { set => $this->string6 = $value; }
public $string7 { set => $this->string7 = $value; }
public string $string8 { set(string $value) => $this->string8 = $value; }
public string $string9 { set(string $value) { $this->string9 = $value; }}
public string $string10 { set { $this->string10 = $value; }}
public $string11 { final set => $this->string11 = $value; }
public $string12 { get { return $this->string12; } }
}