summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/reflection001.phpt
blob: 6492ee1906efdabff980d297d2fbd6684c6bd567 (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
44
45
46
47
--TEST--
Return type and Reflection::export()

--SKIPIF--
<?php
if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70000) {
    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 ]
    }
  }
}