diff --git a/src/polyfills.php b/src/polyfills.php index 92dbca2c..b21416a4 100644 --- a/src/polyfills.php +++ b/src/polyfills.php @@ -16,7 +16,8 @@ class native_types public const type_decimal = 'decimal'; } -class complex_types { +class complex_types +{ public const type_any = 'any'; public const type_var = 'any'; public const type_variant = 'any'; @@ -45,36 +46,39 @@ class std return boolval($value); } - public static function array(mixed $type, int $size): array + public static function bigInt(mixed $value): mixed { - return []; + return $value; } - public static function ordered_map(mixed $key_type, mixed $value_type): array + public static function decimal(mixed $value): mixed { - return []; + return $value; } - public static function map(mixed $key_type, mixed $value_type): array + public static function bigFloat(mixed $value): mixed + { + return $value; + } + + public static function array(mixed $type, int $size): array { return []; } - public static function vector(mixed $value_type): array + public static function ordered_map(mixed $key_type, mixed $value_type): array { return []; } - public static function unsafe_ptr(mixed &$value): mixed + public static function map(mixed $key_type, mixed $value_type): array { - return null; + return []; } - public static function fill(array $array, mixed $value): void + public static function vector(mixed $value_type, ?int $size = null): array { - for ($i = 0; $i < count($array); $i++) { - $array[$i] = $value; - } + return []; } } @@ -93,4 +97,3 @@ function objval(mixed $var, string $className): mixed { return $var; } -