|
|
|
@ -100,6 +100,7 @@ class CompilerBase extends \PhpAot\Core\Translator |
|
|
|
'argv' => self::TYPE_ARRAY, |
|
|
|
'argv' => self::TYPE_ARRAY, |
|
|
|
]; |
|
|
|
]; |
|
|
|
protected array $localVars = []; |
|
|
|
protected array $localVars = []; |
|
|
|
|
|
|
|
protected array $varTypes = []; |
|
|
|
protected array $objectWrappers = []; |
|
|
|
protected array $objectWrappers = []; |
|
|
|
protected bool $strictTypes = false; |
|
|
|
protected bool $strictTypes = false; |
|
|
|
|
|
|
|
|
|
|
|
@ -969,7 +970,7 @@ class CompilerBase extends \PhpAot\Core\Translator |
|
|
|
'}'; |
|
|
|
'}'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected function parseType($type) |
|
|
|
protected function parseType($type): string |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($type == null) { |
|
|
|
if ($type == null) { |
|
|
|
return self::TYPE_VAR; |
|
|
|
return self::TYPE_VAR; |
|
|
|
@ -990,8 +991,8 @@ class CompilerBase extends \PhpAot\Core\Translator |
|
|
|
case 'string': |
|
|
|
case 'string': |
|
|
|
return self::TYPE_STR; |
|
|
|
return self::TYPE_STR; |
|
|
|
default: |
|
|
|
default: |
|
|
|
var_dump($name); |
|
|
|
$this->varTypes[$name] = $name; |
|
|
|
abort($type); |
|
|
|
return self::TYPE_OBJECT; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|