summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/reflection001.phpt
blob: 4c84b6524fa02a0c669627239f68abc2270e99a2 (plain)
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
--TEST--
Return type and Reflection::export()
--SKIPIF--
<?php
if (!extension_loaded('reflection')) print 'skip';
?>
--FILE--
<?php

class A {
    function foo(array $a): array {
        return $a;
    }
}

ReflectionClass::export("A");
--EXPECTF--
Class [ <user> class A ] {
  @@ %sreflection001.php 3-7

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [0] {
  }

  - Methods [1] {
    Method [ <user> public method foo ] {
      @@ %sreflection001.php 4 - 6

      - Parameters [1] {
        Parameter #0 [ <required> array $a ]
      }
      - Return [ array ]
    }
  }
}