@@ -12,29 +12,24 @@ class MyDateTimeZone extends DateTimeZone
12
12
}
13
13
}
14
14
15
- $ methodInfo = new ReflectionMethod (DateTimeZone::class, 'listIdentifiers ' );
16
-
17
- var_dump ($ methodInfo ->hasReturnType ());
18
- var_dump ($ methodInfo ->hasTentativeReturnType ());
19
- var_dump ($ methodInfo ->getReturnType ());
20
- var_dump ((string ) $ methodInfo ->getTentativeReturnType ());
21
- var_dump ((string ) $ methodInfo );
22
- echo "\n" ;
23
-
24
- $ methodInfo = new ReflectionMethod (MyDateTimeZone::class, 'listIdentifiers ' );
15
+ function printInfo (ReflectionMethod $ methodInfo ) {
16
+ var_dump ($ methodInfo ->hasReturnType ());
17
+ var_dump ($ methodInfo ->hasTentativeReturnType ());
18
+ var_dump ((string ) $ methodInfo ->getReturnType ());
19
+ var_dump ((string ) $ methodInfo ->getTentativeReturnType ());
20
+ var_dump ((string ) $ methodInfo );
21
+ echo "\n" ;
22
+ }
25
23
26
- var_dump ($ methodInfo ->hasReturnType ());
27
- var_dump ($ methodInfo ->hasTentativeReturnType ());
28
- var_dump ((string ) $ methodInfo ->getReturnType ());
29
- var_dump ($ methodInfo ->getTentativeReturnType ());
30
- var_dump ((string ) $ methodInfo );
31
- echo "\n" ;
24
+ printInfo (new ReflectionMethod (DateTimeZone::class, 'listIdentifiers ' ));
25
+ printInfo (new ReflectionMethod (MyDateTimeZone::class, 'listIdentifiers ' ));
26
+ printInfo (new ReflectionMethod (FileSystemIterator::class, 'current ' ));
32
27
33
28
?>
34
29
--EXPECTF--
35
30
bool(false)
36
31
bool(true)
37
- NULL
32
+ string(0) ""
38
33
string(5) "array"
39
34
string(%d) "Method [ <internal:date> static public method listIdentifiers ] {
40
35
@@ -49,7 +44,7 @@ string(%d) "Method [ <internal:date> static public method listIdentifiers ] {
49
44
bool(true)
50
45
bool(false)
51
46
string(6) "string"
52
- NULL
47
+ string(0) ""
53
48
string(%d) "Method [ <user, overwrites DateTimeZone, prototype DateTimeZone> static public method listIdentifiers ] {
54
49
@@ %s
55
50
@@ -60,3 +55,15 @@ string(%d) "Method [ <user, overwrites DateTimeZone, prototype DateTimeZone> sta
60
55
- Return [ string ]
61
56
}
62
57
"
58
+
59
+ bool(false)
60
+ bool(true)
61
+ string(0) ""
62
+ string(37) "SplFileInfo|FilesystemIterator|string"
63
+ string(191) "Method [ <internal:SPL, overwrites DirectoryIterator, prototype Iterator> public method current ] {
64
+
65
+ - Parameters [0] {
66
+ }
67
+ - Tentative return [ SplFileInfo|FilesystemIterator|string ]
68
+ }
69
+ "
0 commit comments