Skip to content

Commit 184fdac

Browse files
committed
Remove <default> prefix from reflection dump
This really doesn't add anything, and only makes for confusing terminology. Only marking properties as dynamic is sufficient.
1 parent 083b0c3 commit 184fdac

10 files changed

+24
-28
lines changed

ext/reflection/php_reflection.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,6 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha
843843
if (!prop) {
844844
smart_str_append_printf(str, "<dynamic> public $%s", prop_name);
845845
} else {
846-
if (!(prop->flags & ZEND_ACC_STATIC)) {
847-
smart_str_appends(str, "<default> ");
848-
}
849-
850846
/* These are mutually exclusive */
851847
switch (prop->flags & ZEND_ACC_PPP_MASK) {
852848
case ZEND_ACC_PUBLIC:

ext/reflection/tests/024.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Object of class [ <user> class C1 ] {
2929
}
3030

3131
- Properties [3] {
32-
Property [ <default> private $p1 = 1 ]
33-
Property [ <default> protected $p2 = 2 ]
34-
Property [ <default> public $p3 = 3 ]
32+
Property [ private $p1 = 1 ]
33+
Property [ protected $p2 = 2 ]
34+
Property [ public $p3 = 3 ]
3535
}
3636

3737
- Dynamic properties [1] {

ext/reflection/tests/ReflectionClass_export_basic2.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Class [ <user> class c ] {
2929
}
3030

3131
- Properties [3] {
32-
Property [ <default> private $a = NULL ]
33-
Property [ <default> public ?int $c = 42 ]
34-
Property [ <default> public Foo $d ]
32+
Property [ private $a = NULL ]
33+
Property [ public ?int $c = 42 ]
34+
Property [ public Foo $d ]
3535
}
3636

3737
- Methods [0] {
@@ -51,8 +51,8 @@ Class [ <user> class d extends c ] {
5151
}
5252

5353
- Properties [2] {
54-
Property [ <default> public ?int $c = 42 ]
55-
Property [ <default> public Foo $d ]
54+
Property [ public ?int $c = 42 ]
55+
Property [ public Foo $d ]
5656
}
5757

5858
- Methods [0] {

ext/reflection/tests/ReflectionClass_toString_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector, String
2424
}
2525

2626
- Properties [1] {
27-
Property [ <default> public $name = '' ]
27+
Property [ public $name = '' ]
2828
}
2929

3030
- Methods [53] {

ext/reflection/tests/ReflectionObject___toString_basic1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Object of class [ <user> class Foo ] {
2525
}
2626

2727
- Properties [1] {
28-
Property [ <default> public $bar = 1 ]
28+
Property [ public $bar = 1 ]
2929
}
3030

3131
- Dynamic properties [0] {

ext/reflection/tests/ReflectionObject___toString_basic2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Object of class [ <user> class Foo ] {
2626
}
2727

2828
- Properties [1] {
29-
Property [ <default> public $bar = 1 ]
29+
Property [ public $bar = 1 ]
3030
}
3131

3232
- Dynamic properties [2] {

ext/reflection/tests/ReflectionObject_export_basic1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Object of class [ <user> class Foo ] {
2525
}
2626

2727
- Properties [1] {
28-
Property [ <default> public $bar = 1 ]
28+
Property [ public $bar = 1 ]
2929
}
3030

3131
- Dynamic properties [0] {

ext/reflection/tests/ReflectionObject_export_basic2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Object of class [ <user> class Foo ] {
2626
}
2727

2828
- Properties [1] {
29-
Property [ <default> public $bar = 1 ]
29+
Property [ public $bar = 1 ]
3030
}
3131

3232
- Dynamic properties [2] {

ext/reflection/tests/ReflectionProperty_basic1.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ reflectProperty("TestClass", "priv");
4848
Reflecting on property TestClass::pub
4949

5050
__toString():
51-
string(42) "Property [ <default> public $pub = NULL ]
51+
string(32) "Property [ public $pub = NULL ]
5252
"
5353
getName():
5454
string(3) "pub"
@@ -92,7 +92,7 @@ string(8) "NewValue"
9292
Reflecting on property TestClass::prot
9393

9494
__toString():
95-
string(43) "Property [ <default> protected $prot = 4 ]
95+
string(33) "Property [ protected $prot = 4 ]
9696
"
9797
getName():
9898
string(4) "prot"
@@ -110,7 +110,7 @@ bool(false)
110110
Reflecting on property TestClass::priv
111111

112112
__toString():
113-
string(49) "Property [ <default> private $priv = 'keepOut' ]
113+
string(39) "Property [ private $priv = 'keepOut' ]
114114
"
115115
getName():
116116
string(4) "priv"

sapi/cli/tests/005.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ string(183) "Class [ <internal:Core> class stdClass ] {
3737
}
3838

3939
"
40-
string(2008) "Class [ <internal:Core> class Exception implements Throwable, Stringable ] {
40+
string(1980) "Class [ <internal:Core> class Exception implements Throwable, Stringable ] {
4141

4242
- Constants [0] {
4343
}
@@ -49,13 +49,13 @@ string(2008) "Class [ <internal:Core> class Exception implements Throwable, Stri
4949
}
5050

5151
- Properties [7] {
52-
Property [ <default> protected $message ]
53-
Property [ <default> private $string ]
54-
Property [ <default> protected $code ]
55-
Property [ <default> protected $file ]
56-
Property [ <default> protected $line ]
57-
Property [ <default> private $trace ]
58-
Property [ <default> private $previous ]
52+
Property [ protected $message = '' ]
53+
Property [ private $string = '' ]
54+
Property [ protected $code = 0 ]
55+
Property [ protected $file = NULL ]
56+
Property [ protected $line = NULL ]
57+
Property [ private $trace = NULL ]
58+
Property [ private $previous = NULL ]
5959
}
6060

6161
- Methods [11] {

0 commit comments

Comments
 (0)