1--TEST-- 2ReflectionClass::__toString() 3--CREDITS-- 4Robin Fernandes <robinf@php.net> 5Steve Seear <stevseea@php.net> 6--FILE-- 7<?php 8$rc = new ReflectionClass("ReflectionClass"); 9echo $rc; 10?> 11--EXPECT-- 12Class [ <internal:Reflection> class ReflectionClass implements Stringable, Reflector ] { 13 14 - Constants [4] { 15 Constant [ public int IS_IMPLICIT_ABSTRACT ] { 16 } 16 Constant [ public int IS_EXPLICIT_ABSTRACT ] { 64 } 17 Constant [ public int IS_FINAL ] { 32 } 18 Constant [ public int IS_READONLY ] { 65536 } 19 } 20 21 - Static properties [0] { 22 } 23 24 - Static methods [0] { 25 } 26 27 - Properties [1] { 28 Property [ public string $name ] 29 } 30 31 - Methods [56] { 32 Method [ <internal:Reflection> private method __clone ] { 33 34 - Parameters [0] { 35 } 36 - Return [ void ] 37 } 38 39 Method [ <internal:Reflection, ctor> public method __construct ] { 40 41 - Parameters [1] { 42 Parameter #0 [ <required> object|string $objectOrClass ] 43 } 44 } 45 46 Method [ <internal:Reflection, prototype Stringable> public method __toString ] { 47 48 - Parameters [0] { 49 } 50 - Return [ string ] 51 } 52 53 Method [ <internal:Reflection> public method getName ] { 54 55 - Parameters [0] { 56 } 57 - Tentative return [ string ] 58 } 59 60 Method [ <internal:Reflection> public method isInternal ] { 61 62 - Parameters [0] { 63 } 64 - Tentative return [ bool ] 65 } 66 67 Method [ <internal:Reflection> public method isUserDefined ] { 68 69 - Parameters [0] { 70 } 71 - Tentative return [ bool ] 72 } 73 74 Method [ <internal:Reflection> public method isAnonymous ] { 75 76 - Parameters [0] { 77 } 78 - Tentative return [ bool ] 79 } 80 81 Method [ <internal:Reflection> public method isInstantiable ] { 82 83 - Parameters [0] { 84 } 85 - Tentative return [ bool ] 86 } 87 88 Method [ <internal:Reflection> public method isCloneable ] { 89 90 - Parameters [0] { 91 } 92 - Tentative return [ bool ] 93 } 94 95 Method [ <internal:Reflection> public method getFileName ] { 96 97 - Parameters [0] { 98 } 99 - Tentative return [ string|false ] 100 } 101 102 Method [ <internal:Reflection> public method getStartLine ] { 103 104 - Parameters [0] { 105 } 106 - Tentative return [ int|false ] 107 } 108 109 Method [ <internal:Reflection> public method getEndLine ] { 110 111 - Parameters [0] { 112 } 113 - Tentative return [ int|false ] 114 } 115 116 Method [ <internal:Reflection> public method getDocComment ] { 117 118 - Parameters [0] { 119 } 120 - Tentative return [ string|false ] 121 } 122 123 Method [ <internal:Reflection> public method getConstructor ] { 124 125 - Parameters [0] { 126 } 127 - Tentative return [ ?ReflectionMethod ] 128 } 129 130 Method [ <internal:Reflection> public method hasMethod ] { 131 132 - Parameters [1] { 133 Parameter #0 [ <required> string $name ] 134 } 135 - Tentative return [ bool ] 136 } 137 138 Method [ <internal:Reflection> public method getMethod ] { 139 140 - Parameters [1] { 141 Parameter #0 [ <required> string $name ] 142 } 143 - Tentative return [ ReflectionMethod ] 144 } 145 146 Method [ <internal:Reflection> public method getMethods ] { 147 148 - Parameters [1] { 149 Parameter #0 [ <optional> ?int $filter = null ] 150 } 151 - Tentative return [ array ] 152 } 153 154 Method [ <internal:Reflection> public method hasProperty ] { 155 156 - Parameters [1] { 157 Parameter #0 [ <required> string $name ] 158 } 159 - Tentative return [ bool ] 160 } 161 162 Method [ <internal:Reflection> public method getProperty ] { 163 164 - Parameters [1] { 165 Parameter #0 [ <required> string $name ] 166 } 167 - Tentative return [ ReflectionProperty ] 168 } 169 170 Method [ <internal:Reflection> public method getProperties ] { 171 172 - Parameters [1] { 173 Parameter #0 [ <optional> ?int $filter = null ] 174 } 175 - Tentative return [ array ] 176 } 177 178 Method [ <internal:Reflection> public method hasConstant ] { 179 180 - Parameters [1] { 181 Parameter #0 [ <required> string $name ] 182 } 183 - Tentative return [ bool ] 184 } 185 186 Method [ <internal:Reflection> public method getConstants ] { 187 188 - Parameters [1] { 189 Parameter #0 [ <optional> ?int $filter = null ] 190 } 191 - Tentative return [ array ] 192 } 193 194 Method [ <internal:Reflection> public method getReflectionConstants ] { 195 196 - Parameters [1] { 197 Parameter #0 [ <optional> ?int $filter = null ] 198 } 199 - Tentative return [ array ] 200 } 201 202 Method [ <internal:Reflection> public method getConstant ] { 203 204 - Parameters [1] { 205 Parameter #0 [ <required> string $name ] 206 } 207 - Tentative return [ mixed ] 208 } 209 210 Method [ <internal:Reflection> public method getReflectionConstant ] { 211 212 - Parameters [1] { 213 Parameter #0 [ <required> string $name ] 214 } 215 - Tentative return [ ReflectionClassConstant|false ] 216 } 217 218 Method [ <internal:Reflection> public method getInterfaces ] { 219 220 - Parameters [0] { 221 } 222 - Tentative return [ array ] 223 } 224 225 Method [ <internal:Reflection> public method getInterfaceNames ] { 226 227 - Parameters [0] { 228 } 229 - Tentative return [ array ] 230 } 231 232 Method [ <internal:Reflection> public method isInterface ] { 233 234 - Parameters [0] { 235 } 236 - Tentative return [ bool ] 237 } 238 239 Method [ <internal:Reflection> public method getTraits ] { 240 241 - Parameters [0] { 242 } 243 - Tentative return [ array ] 244 } 245 246 Method [ <internal:Reflection> public method getTraitNames ] { 247 248 - Parameters [0] { 249 } 250 - Tentative return [ array ] 251 } 252 253 Method [ <internal:Reflection> public method getTraitAliases ] { 254 255 - Parameters [0] { 256 } 257 - Tentative return [ array ] 258 } 259 260 Method [ <internal:Reflection> public method isTrait ] { 261 262 - Parameters [0] { 263 } 264 - Tentative return [ bool ] 265 } 266 267 Method [ <internal:Reflection> public method isEnum ] { 268 269 - Parameters [0] { 270 } 271 - Return [ bool ] 272 } 273 274 Method [ <internal:Reflection> public method isAbstract ] { 275 276 - Parameters [0] { 277 } 278 - Tentative return [ bool ] 279 } 280 281 Method [ <internal:Reflection> public method isFinal ] { 282 283 - Parameters [0] { 284 } 285 - Tentative return [ bool ] 286 } 287 288 Method [ <internal:Reflection> public method isReadOnly ] { 289 290 - Parameters [0] { 291 } 292 - Return [ bool ] 293 } 294 295 Method [ <internal:Reflection> public method getModifiers ] { 296 297 - Parameters [0] { 298 } 299 - Tentative return [ int ] 300 } 301 302 Method [ <internal:Reflection> public method isInstance ] { 303 304 - Parameters [1] { 305 Parameter #0 [ <required> object $object ] 306 } 307 - Tentative return [ bool ] 308 } 309 310 Method [ <internal:Reflection> public method newInstance ] { 311 312 - Parameters [1] { 313 Parameter #0 [ <optional> mixed ...$args ] 314 } 315 - Tentative return [ object ] 316 } 317 318 Method [ <internal:Reflection> public method newInstanceWithoutConstructor ] { 319 320 - Parameters [0] { 321 } 322 - Tentative return [ object ] 323 } 324 325 Method [ <internal:Reflection> public method newInstanceArgs ] { 326 327 - Parameters [1] { 328 Parameter #0 [ <optional> array $args = [] ] 329 } 330 - Tentative return [ ?object ] 331 } 332 333 Method [ <internal:Reflection> public method getParentClass ] { 334 335 - Parameters [0] { 336 } 337 - Tentative return [ ReflectionClass|false ] 338 } 339 340 Method [ <internal:Reflection> public method isSubclassOf ] { 341 342 - Parameters [1] { 343 Parameter #0 [ <required> ReflectionClass|string $class ] 344 } 345 - Tentative return [ bool ] 346 } 347 348 Method [ <internal:Reflection> public method getStaticProperties ] { 349 350 - Parameters [0] { 351 } 352 - Tentative return [ array ] 353 } 354 355 Method [ <internal:Reflection> public method getStaticPropertyValue ] { 356 357 - Parameters [2] { 358 Parameter #0 [ <required> string $name ] 359 Parameter #1 [ <optional> mixed $default = <default> ] 360 } 361 - Tentative return [ mixed ] 362 } 363 364 Method [ <internal:Reflection> public method setStaticPropertyValue ] { 365 366 - Parameters [2] { 367 Parameter #0 [ <required> string $name ] 368 Parameter #1 [ <required> mixed $value ] 369 } 370 - Tentative return [ void ] 371 } 372 373 Method [ <internal:Reflection> public method getDefaultProperties ] { 374 375 - Parameters [0] { 376 } 377 - Tentative return [ array ] 378 } 379 380 Method [ <internal:Reflection> public method isIterable ] { 381 382 - Parameters [0] { 383 } 384 - Tentative return [ bool ] 385 } 386 387 Method [ <internal:Reflection> public method isIterateable ] { 388 389 - Parameters [0] { 390 } 391 - Tentative return [ bool ] 392 } 393 394 Method [ <internal:Reflection> public method implementsInterface ] { 395 396 - Parameters [1] { 397 Parameter #0 [ <required> ReflectionClass|string $interface ] 398 } 399 - Tentative return [ bool ] 400 } 401 402 Method [ <internal:Reflection> public method getExtension ] { 403 404 - Parameters [0] { 405 } 406 - Tentative return [ ?ReflectionExtension ] 407 } 408 409 Method [ <internal:Reflection> public method getExtensionName ] { 410 411 - Parameters [0] { 412 } 413 - Tentative return [ string|false ] 414 } 415 416 Method [ <internal:Reflection> public method inNamespace ] { 417 418 - Parameters [0] { 419 } 420 - Tentative return [ bool ] 421 } 422 423 Method [ <internal:Reflection> public method getNamespaceName ] { 424 425 - Parameters [0] { 426 } 427 - Tentative return [ string ] 428 } 429 430 Method [ <internal:Reflection> public method getShortName ] { 431 432 - Parameters [0] { 433 } 434 - Tentative return [ string ] 435 } 436 437 Method [ <internal:Reflection> public method getAttributes ] { 438 439 - Parameters [2] { 440 Parameter #0 [ <optional> ?string $name = null ] 441 Parameter #1 [ <optional> int $flags = 0 ] 442 } 443 - Return [ array ] 444 } 445 } 446} 447