13a055efa4
Conversion of PHP versions so we don't need PHP to build HHVM For the most part, the generated files haven't changed from the PHP sourced versions (apart from minor indentation and whitespace changes). Except for one major exception: An IDL's function/method argument list includes a "value" field for default parameters which takes psuedo-serialized values in several forms. Most are simple scalarish values like: "true", "null", "null_array", "null_variant", "123", "0x456", "0123", "1.23", "\"foo\"" However referencing other constants is also supported: "k_FOO", "q_Bar$$BAZ" Or even bitmask compositions like: "k_FOO|k_BAR|k_BAZ" Runtime uses of these values are encoded directly into *.ext_hhvm.cpp files, so they reach userspace code just fine. The value placed in g_class_map are used exclusively by ext_reflection to allow introspection at runtime. Under the old class_map.php parameter default constant references would be resolved in a (somewhat buggy) eval(), since we don't have eval within gen-class-map, we reuse the kUnserializable deferral. This diff provides a mechanism to resolve this in ReflectionMethod uses (an improvement from previous behavior), and leaves the current eval-on-demand behavior for ReflectionFunction. These two code paths are different due to the partial state of migration away from using ClassInfo.
9 linhas
243 B
PHP
9 linhas
243 B
PHP
<?php
|
|
echo "--SQLite3::open--\n";
|
|
$ro = new ReflectionClass('SQLite3');
|
|
$mo = $ro->getMethod('open');
|
|
$params = $mo->getParameters();
|
|
var_dump($params[1]->getDefaultValue());
|
|
var_dump(str_replace(' ', '', $params[1]->getDefaultValueText()));
|
|
|