Skip to content

Allow CTE on more CTE safe functions #10771

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

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8537cff
Fix #7780, some CTE functions were removed by a mistake
mvorisek Mar 3, 2023
51f5cb6
Merge branch 'fix_cte_stub'
mvorisek Mar 3, 2023
feba3e4
ctype_* functions
mvorisek Mar 4, 2023
c6c4f21
zlib_* string functions
mvorisek Mar 4, 2023
49f9a89
tokenizer functions
mvorisek Mar 4, 2023
f16c3e1
hash function
mvorisek Mar 4, 2023
0f56de5
CTE safe basic functions
mvorisek Mar 4, 2023
8e31c3e
adjust observer tests
mvorisek Mar 4, 2023
f357a7b
never evaluate hash_equals at compile time
mvorisek Mar 4, 2023
5bed8e6
ctype_lower/ctype_upper is locale dependent
mvorisek Mar 4, 2023
7b26cff
tokenizer returns array of objects
mvorisek Mar 4, 2023
d2ef625
revert some unsafe
mvorisek Mar 4, 2023
11ec828
Revert "adjust observer tests"
mvorisek Mar 4, 2023
59cf585
replace array_sum with array_reduce on observer tests
mvorisek Mar 4, 2023
745d491
fix phpdoc order for consistency
mvorisek Mar 6, 2023
dca71d9
add xfail
mvorisek Mar 6, 2023
6ef8fd1
hash can be slow, do not evaluate it as CTE
mvorisek Mar 7, 2023
16cb160
sprintf functions are locale dependent
mvorisek Mar 7, 2023
0555541
remove crypt, it can be slow
mvorisek Mar 7, 2023
a2a86c8
remove strptime as CTEable, it depends on locale
mvorisek Mar 8, 2023
8525ece
Merge branch 'master'
mvorisek Mar 8, 2023
e0652de
Merge branch 'master'
mvorisek Mar 10, 2023
d0de618
Revert "ctype functions"
mvorisek Mar 13, 2023
1226548
Remove CTE flag from array_diff_ukey(), which was added by mistake
mvorisek Mar 15, 2023
86b0bc4
Merge branch 'master'
mvorisek Apr 24, 2023
8d347ed
Revert "zlib_* string functions" - compress can be slow
mvorisek Mar 4, 2023
17a3718
Merge remote-tracking branch 'origin/master' into more_cte
mvorisek May 11, 2023
ff9b2ba
rm long2ip family
mvorisek May 11, 2023
4e764fe
remove all other unwanted
mvorisek May 12, 2023
aeddb82
strnatcasecmp is not locale safe too
mvorisek May 12, 2023
6bb8a2f
xfail deoptimized test with opcache only
mvorisek May 12, 2023
13b0fd6
rm more locale dependent functions
mvorisek May 12, 2023
8f4e5af
fix xfail
mvorisek May 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions ext/ctype/ctype.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,51 @@

/** @generate-class-entries */

/**
* @compile-time-eval
*/
function ctype_alnum(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_alpha(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_cntrl(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_digit(mixed $text): bool {}

function ctype_lower(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_graph(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_print(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_punct(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_space(mixed $text): bool {}

function ctype_upper(mixed $text): bool {}

/**
* @compile-time-eval
*/
function ctype_xdigit(mixed $text): bool {}
20 changes: 10 additions & 10 deletions ext/ctype/ctype_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ext/gd/gd.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ function imagesetbrush(GdImage $image, GdImage $brush): bool {}
/** @refcount 1 */
function imagecreate(int $width, int $height): GdImage|false {}

/** @compile-time-eval */
function imagetypes(): int {}

/** @refcount 1 */
Expand Down
4 changes: 2 additions & 2 deletions ext/gd/gd_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion ext/hash/hash.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
*/
const HASH_HMAC = UNKNOWN;

/** @refcount 1 */
/**
* @compile-time-eval
* @refcount 1
*/
function hash(string $algo, string $data, bool $binary = false, array $options = []): string {}

/** @refcount 1 */
function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}

/**
* @compile-time-eval
* @refcount 1
*/
function hash_hmac(string $algo, string $data, #[\SensitiveParameter] string $key, bool $binary = false): string {}
Expand Down Expand Up @@ -45,12 +49,14 @@ function hash_copy(HashContext $context): HashContext {}

/**
* @return array<int, string>
* @compile-time-eval
* @refcount 1
*/
function hash_algos(): array {}

/**
* @return array<int, string>
* @compile-time-eval
* @refcount 1
*/
function hash_hmac_algos(): array {}
Expand Down
10 changes: 5 additions & 5 deletions ext/hash/hash_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading