-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Allow CTE on basic type/math functions #10842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
069fa1a
68cf38b
7a2fd6c
f29b1a4
e116627
a93775c
9ae6515
07a8df1
b4b6bbd
7023601
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1722,14 +1722,14 @@ function array_pad(array $array, int $length, mixed $value): array {} | |
|
||
/** | ||
* @return array<int|string, int|string> | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_flip(array $array): array {} | ||
|
||
/** | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_change_key_case(array $array, int $case = CASE_LOWER): array {} | ||
|
||
|
@@ -1738,7 +1738,10 @@ function array_change_key_case(array $array, int $case = CASE_LOWER): array {} | |
*/ | ||
function array_unique(array $array, int $flags = SORT_STRING): array {} | ||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_intersect_key(array $array, array ...$arrays): array {} | ||
|
||
/** | ||
|
@@ -1747,7 +1750,10 @@ function array_intersect_key(array $array, array ...$arrays): array {} | |
*/ | ||
function array_intersect_ukey(array $array, ...$rest): array {} | ||
iluuu1994 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_intersect(array $array, array ...$arrays): array {} | ||
|
||
/** | ||
|
@@ -1756,7 +1762,10 @@ function array_intersect(array $array, array ...$arrays): array {} | |
*/ | ||
function array_uintersect(array $array, ...$rest): array {} | ||
iluuu1994 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_intersect_assoc(array $array, array ...$arrays): array {} | ||
|
||
/** | ||
|
@@ -1778,8 +1787,8 @@ function array_intersect_uassoc(array $array, ...$rest): array {} | |
function array_uintersect_uassoc(array $array, ...$rest): array {} | ||
|
||
/** | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_diff_key(array $array, array ...$arrays): array {} | ||
|
||
|
@@ -1801,8 +1810,8 @@ function array_diff(array $array, array ...$arrays): array {} | |
function array_udiff(array $array, ...$rest): array {} | ||
|
||
/** | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function array_diff_assoc(array $array, array ...$arrays): array {} | ||
|
||
|
@@ -1867,8 +1876,8 @@ function array_is_list(array $array): bool {} | |
/* base64.c */ | ||
|
||
/** | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function base64_encode(string $string): string {} | ||
|
||
|
@@ -2280,8 +2289,8 @@ function wordwrap(string $string, int $width = 75, string $break = "\n", bool $c | |
|
||
/** | ||
* @return array<int, string> | ||
* @refcount 1 | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function explode(string $separator, string $string, int $limit = PHP_INT_MAX): array {} | ||
|
||
|
@@ -2958,42 +2967,61 @@ function mail(string $to, string $subject, string $message, array|string $additi | |
|
||
/* math.c */ | ||
|
||
/** @compile-time-eval */ | ||
function abs(int|float $num): int|float {} | ||
|
||
/** @compile-time-eval */ | ||
function ceil(int|float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function floor(int|float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} | ||
|
||
/** @compile-time-eval */ | ||
function sin(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function cos(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function tan(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function asin(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function acos(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function atan(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function atanh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function atan2(float $y, float $x): float {} | ||
|
||
/** @compile-time-eval */ | ||
function sinh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function cosh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function tanh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function asinh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function acosh(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function expm1(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function log1p(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
|
@@ -3014,18 +3042,25 @@ function is_infinite(float $num): bool {} | |
/** @compile-time-eval */ | ||
function pow(mixed $num, mixed $exponent): int|float|object {} | ||
|
||
/** @compile-time-eval */ | ||
function exp(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function log(float $num, float $base = M_E): float {} | ||
|
||
/** @compile-time-eval */ | ||
function log10(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function sqrt(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function hypot(float $x, float $y): float {} | ||
|
||
/** @compile-time-eval */ | ||
function deg2rad(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
function rad2deg(float $num): float {} | ||
|
||
/** @compile-time-eval */ | ||
|
@@ -3055,14 +3090,26 @@ function decoct(int $num): string {} | |
*/ | ||
function dechex(int $num): string {} | ||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function base_convert(string $num, int $from_base, int $to_base): string {} | ||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function number_format(float $num, int $decimals = 0, ?string $decimal_separator = ".", ?string $thousands_separator = ","): string {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function fmod(float $num1, float $num2): float {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function fdiv(float $num1, float $num2): float {} | ||
|
||
/* microtime.c */ | ||
|
@@ -3088,11 +3135,15 @@ function getrusage(int $mode = 0): array|false {} | |
|
||
/* pack.c */ | ||
|
||
/** @refcount 1 */ | ||
/** | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function pack(string $format, mixed ...$values): string {} | ||
|
||
/** | ||
* @return array<int|string, mixed>|false | ||
* @compile-time-eval | ||
* @refcount 1 | ||
*/ | ||
function unpack(string $format, string $string, int $offset = 0): array|false {} | ||
|
@@ -3358,29 +3409,56 @@ function socket_set_timeout($stream, int $seconds, int $microseconds = 0): bool | |
|
||
/* type.c */ | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function gettype(mixed $value): string {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function get_debug_type(mixed $value): string {} | ||
|
||
function settype(mixed &$var, string $type): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function intval(mixed $value, int $base = 10): int {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function floatval(mixed $value): float {} | ||
|
||
/** @alias floatval */ | ||
function doubleval(mixed $value): float {} | ||
mvorisek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function boolval(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function strval(mixed $value): string {} | ||
iluuu1994 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_null(mixed $value): bool {} | ||
|
||
function is_resource(mixed $value): bool {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct me if I am wrong, but can resource be even observed on CT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, but it could eliminate calls like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added |
||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_bool(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_int(mixed $value): bool {} | ||
|
||
/** @alias is_int */ | ||
|
@@ -3389,26 +3467,50 @@ function is_integer(mixed $value): bool {} | |
/** @alias is_int */ | ||
function is_long(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_float(mixed $value): bool {} | ||
|
||
/** @alias is_float */ | ||
function is_double(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_numeric(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_string(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_array(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_object(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_scalar(mixed $value): bool {} | ||
|
||
/** @param string $callable_name */ | ||
function is_callable(mixed $value, bool $syntax_only = false, &$callable_name = null): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_iterable(mixed $value): bool {} | ||
|
||
/** | ||
* @compile-time-eval | ||
*/ | ||
function is_countable(mixed $value): bool {} | ||
|
||
/* uniqid.c */ | ||
|
Uh oh!
There was an error while loading. Please reload this page.