1--TEST--
2ReflectionConstant::getExtension()
3--EXTENSIONS--
4json
5--FILE--
6<?php
7
8$reflectionConstant = new ReflectionConstant('PHP_VERSION');
9var_dump($reflectionConstant->getExtension());
10
11$reflectionConstant = new ReflectionConstant('JSON_ERROR_NONE');
12var_dump($reflectionConstant->getExtension());
13
14const CT_CONST = 5;
15$reflectionConstant = new ReflectionConstant('CT_CONST');
16var_dump($reflectionConstant->getExtension());
17
18define('RT_CONST', 6);
19$reflectionConstant = new ReflectionConstant('RT_CONST');
20var_dump($reflectionConstant->getExtension());
21?>
22--EXPECTF--
23object(ReflectionExtension)#%d (1) {
24  ["name"]=>
25  string(4) "Core"
26}
27object(ReflectionExtension)#%d (1) {
28  ["name"]=>
29  string(4) "json"
30}
31NULL
32NULL
33