- Add referencedClasses array to store fully resolved class names - Implement recordReferencedClass method to track class references - Enhance function call parsing with static function resolution - Add native function lookup and return type detection - Insert type conversion for runtime call results - Resolve extension dependencies based on internal functions and classes - Append extension requirements to generated module header - Update tests to validate extension dependency detection - Add test case for runtime builtin int property assignment - Modify polymorphic class dispatch to restore string representationmaster
parent
6c0c26458f
commit
745556fee8
9 changed files with 240 additions and 18 deletions
@ -0,0 +1,49 @@ |
||||
--TEST-- |
||||
Runtime-dispatched builtin int results support typed property assignments |
||||
--FILE-- |
||||
<?php |
||||
|
||||
namespace RuntimeBuiltinNamespace { |
||||
|
||||
class RuntimeBuiltinIntProperty |
||||
{ |
||||
public int $value = 0; |
||||
|
||||
public function assign(): void |
||||
{ |
||||
$this->value = connection_status(); |
||||
} |
||||
|
||||
public function add(): void |
||||
{ |
||||
$this->value += connection_status(); |
||||
} |
||||
|
||||
public function addViaLocal(): void |
||||
{ |
||||
$status = connection_status(); |
||||
$this->value += $status; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
namespace { |
||||
|
||||
function main(): void |
||||
{ |
||||
$value = new RuntimeBuiltinNamespace\RuntimeBuiltinIntProperty(); |
||||
$value->assign(); |
||||
var_dump($value->value); |
||||
$value->add(); |
||||
var_dump($value->value); |
||||
$value->addViaLocal(); |
||||
var_dump($value->value); |
||||
} |
||||
|
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
int(0) |
||||
int(0) |
||||
int(0) |
||||
Loading…
Reference in new issue