Skip to content

Commit

Permalink
Update PHP function list to PHP 8.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Dec 19, 2024
1 parent bd29e3c commit 0e19b50
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* [Perl](tools/lang/Perl.pl), up to Perl 5.36. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#perl)
* [PowerShell](tools/lang/PowerShell.ps1), up to PowerShell 7.2.
* [Python](tools/lang/Python.py), up to Python 3.13. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#python)
* [PHP Script](tools/lang/PHP.php), up to PHP 8.3. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#php)
* [PHP Script](tools/lang/PHP.php), up to PHP 8.4. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#php)
* Windows Rescouce Script
* [R](tools/lang/R.r), up to R 4.2.
* [REBOL](tools/lang/Rebol.r) 3 and [Red](tools/lang/Red.red)
Expand Down
27 changes: 13 additions & 14 deletions src/EditLexers/stlPHP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static KEYWORDLIST Keywords_PHP = {{
"ERRMODE_EXCEPTION ERRMODE_SILENT ERRMODE_WARNING ERR_NONE EUROPE EXCLUDE_START_DATE EXTR_IF_EXISTS EXTR_OVERWRITE "
"EXTR_PREFIX_ALL EXTR_PREFIX_IF_EXISTS EXTR_PREFIX_INVALID EXTR_PREFIX_SAME EXTR_REFS EXTR_SKIP E_ALL "
"E_COMPILE_ERROR E_COMPILE_WARNING E_CORE_ERROR E_CORE_WARNING E_DEPRECATED E_ERROR E_NOTICE E_PARSE E_RECOVERABLE_ERROR "
"E_STRICT E_USER_DEPRECATED E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING "
"E_USER_DEPRECATED E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING "
"FETCH_ASSOC FETCH_BOTH FETCH_BOUND FETCH_CLASS FETCH_CLASSTYPE FETCH_COLUMN FETCH_DEFAULT FETCH_FUNC FETCH_GROUP "
"FETCH_INTO FETCH_KEY_PAIR FETCH_LAZY FETCH_NAMED FETCH_NUM "
"FETCH_OBJ FETCH_ORI_ABS FETCH_ORI_FIRST FETCH_ORI_LAST FETCH_ORI_NEXT FETCH_ORI_PRIOR FETCH_ORI_REL FETCH_PROPS_LATE "
Expand Down Expand Up @@ -175,14 +175,14 @@ static KEYWORDLIST Keywords_PHP = {{
"STREAM_PF_INET STREAM_PF_INET6 STREAM_PF_UNIX STREAM_SERVER_BIND STREAM_SERVER_LISTEN "
"STREAM_SHUT_RD STREAM_SHUT_RDWR STREAM_SHUT_WR "
"STREAM_SOCK_DGRAM STREAM_SOCK_RAW STREAM_SOCK_RDM STREAM_SOCK_SEQPACKET STREAM_SOCK_STREAM STREAM_USE_PATH "
"STR_PAD_BOTH STR_PAD_LEFT STR_PAD_RIGHT SUNFUNCS_RET_DOUBLE SUNFUNCS_RET_STRING SUNFUNCS_RET_TIMESTAMP "
"STR_PAD_BOTH STR_PAD_LEFT STR_PAD_RIGHT "
"TOSTRING_USE_CURRENT TOSTRING_USE_INNER TOSTRING_USE_KEY UNIX_PATHS USE_KEY UTC W3C "

, // 8 function
"abs( accept( acos( acosh( add( addAll( addAttribute( addChild( addcslashes( addslashes( allowsNull( append( "
"array_change_key_case( array_chunk( array_column( array_combine( array_count_values( "
"array_all( array_any( array_change_key_case( array_chunk( array_column( array_combine( array_count_values( "
"array_diff( array_diff_assoc( array_diff_key( array_diff_uassoc( array_diff_ukey( "
"array_fill( array_fill_keys( array_filter( array_flip( "
"array_fill( array_fill_keys( array_filter( array_find( array_find_key( array_flip( "
"array_intersect( array_intersect_assoc( array_intersect_key( array_intersect_uassoc( array_intersect_ukey( "
"array_is_list( array_key_exists( array_key_first( array_key_last( array_keys( "
"array_map( array_merge( array_merge_recursive( array_multisort( array_pad( array_pop( array_product( array_push( "
Expand All @@ -192,7 +192,7 @@ static KEYWORDLIST Keywords_PHP = {{
"array_walk( array_walk_recursive( arsort( asXML( asin( asinh( asort( assert( assert_options( "
"atan( atan2( atanh( attach( attachIterator( attr_get( attr_set( attributes( autocommit( "
"backup( base64_decode( base64_encode( base_convert( basename( "
"bcadd( bccomp( bcdiv( bcmod( bcmul( bcpow( bcpowmod( bcscale( bcsqrt( bcsub( "
"bcadd( bccomp( bcdiv( bcdivmod( bcmod( bcmul( bcpow( bcpowmod( bcscale( bcsqrt( bcsub( "
"beginChildren( beginIteration( beginTransaction( begin_transaction( "
"bin2hex( bind( bindColumn( bindParam( bindTo( bindValue( bind_param( bind_result( bindec( boolval( bottom( busyTimeout( "
"call( callGetChildren( callHasChildren( call_user_func( call_user_func_array( canBePassedByValue( cases( ceil( "
Expand Down Expand Up @@ -273,9 +273,8 @@ static KEYWORDLIST Keywords_PHP = {{
"hash_algos( hash_copy( hash_equals( hash_file( hash_final( hash_hkdf( hash_hmac( hash_hmac_algos( hash_hmac_file( "
"hash_init( hash_pbkdf2( hash_update( hash_update_file( hash_update_stream( "
"header( header_register_callback( header_remove( headers_list( headers_sent( hebrev( hex2bin( hexdec( "
"highlight_file( highlight_string( hrtime( "
"html_entity_decode( htmlentities( htmlspecialchars( htmlspecialchars_decode( http_build_query( http_response_code( "
"hypot( "
"highlight_file( highlight_string( hrtime( html_entity_decode( htmlentities( htmlspecialchars( htmlspecialchars_decode( "
"http_build_query( http_clear_last_response_headers( http_get_last_response_headers( http_response_code( hypot( "
"iconv( iconv_get_encoding( iconv_mime_decode( iconv_mime_decode_headers( iconv_mime_encode( "
"iconv_set_encoding( iconv_strlen( iconv_strpos( iconv_strrpos( iconv_substr( idate( ignore_user_abort( "
"implementsInterface( implode( inNamespace( inTransaction( in_array( inet_ntop( inet_pton( info( "
Expand All @@ -302,11 +301,11 @@ static KEYWORDLIST Keywords_PHP = {{
"mb_encode_mimeheader( mb_encode_numericentity( mb_encoding_aliases( mb_ereg( mb_ereg_match( "
"mb_ereg_replace( mb_ereg_replace_callback( mb_ereg_search( mb_ereg_search_getpos( mb_ereg_search_getregs( "
"mb_ereg_search_init( mb_ereg_search_pos( mb_ereg_search_regs( mb_ereg_search_setpos( mb_eregi( mb_eregi_replace( "
"mb_get_info( mb_http_input( mb_http_output( mb_internal_encoding( mb_language( mb_list_encodings( "
"mb_ord( mb_output_handler( mb_parse_str( mb_preferred_mime_name( mb_regex_encoding( mb_regex_set_options( mb_send_mail( "
"mb_split( mb_str_pad( mb_str_split( mb_strcut( mb_strimwidth( mb_stripos( mb_stristr( mb_strlen( mb_strpos( "
"mb_strrchr( mb_strrichr( mb_strripos( mb_strrpos( mb_strstr( mb_strtolower( mb_strtoupper( mb_strwidth( "
"mb_substitute_character( mb_substr( mb_substr_count( md5( md5_file( "
"mb_get_info( mb_http_input( mb_http_output( mb_internal_encoding( mb_language( mb_lcfirst( mb_list_encodings( mb_ltrim( "
"mb_ord( mb_output_handler( mb_parse_str( mb_preferred_mime_name( mb_regex_encoding( mb_regex_set_options( mb_rtrim( "
"mb_send_mail( mb_split( mb_str_pad( mb_str_split( mb_strcut( mb_strimwidth( mb_stripos( mb_stristr( mb_strlen( "
"mb_strpos( mb_strrchr( mb_strrichr( mb_strripos( mb_strrpos( mb_strstr( mb_strtolower( mb_strtoupper( mb_strwidth( "
"mb_substitute_character( mb_substr( mb_substr_count( mb_trim( mb_ucfirst( md5( md5_file( "
"memory_get_peak_usage( memory_get_usage( memory_reset_peak_usage( metaphone( method_exists( microtime( min( "
"mkdir( mktime( modify( more_results( move_uploaded_file( mt_getrandmax( mt_rand( mt_srand( multi_query( "
"natcasesort( natsort( net_get_interfaces( newInstance( newInstanceArgs( newInstanceWithoutConstructor( "
Expand All @@ -328,7 +327,7 @@ static KEYWORDLIST Keywords_PHP = {{
"read( readOnly( readdir( readfile( readlink( "
"real_connect( real_escape_string( real_query( realpath( realpath_cache_get( realpath_cache_size( reap_async_query( "
"recoverFromCorruption( refresh( registerXPathNamespace( register_shutdown_function( register_tick_function( "
"release_savepoint( removeAll( removeAllExcept( rename( "
"release_savepoint( removeAll( removeAllExcept( rename( request_parse_body( "
"reset( restore_error_handler( restore_exception_handler( result_metadata( resume( returnsReference( rewind( rewinddir( "
"rmdir( rollBack( rollback( round( rowCount( rsort( rtrim( "
"savepoint( scandir( seek( select_db( send( send_long_data( serialize( session_abort( "
Expand Down
20 changes: 14 additions & 6 deletions tools/lang/PHP.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// 8.3 https://www.php.net/
// 8.4 https://www.php.net/
// https://wiki.php.net/rfc
// https://php.watch/versions

Expand Down Expand Up @@ -292,7 +292,6 @@ final class FiberError extends Error {}
E_USER_ERROR
E_USER_WARNING
E_USER_NOTICE
E_STRICT
E_RECOVERABLE_ERROR
E_DEPRECATED
E_USER_DEPRECATED
Expand Down Expand Up @@ -938,10 +937,6 @@ class SQLite3Result {

{ // Date and Time Related Extensions
{ // Date and Time
SUNFUNCS_RET_TIMESTAMP
SUNFUNCS_RET_STRING
SUNFUNCS_RET_DOUBLE

class DateTime implements DateTimeInterface {
public __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
public add(DateInterval $interval): DateTime
Expand Down Expand Up @@ -1306,13 +1301,16 @@ class Directory {
mb_http_output(?string $encoding = null): string|bool
mb_internal_encoding(?string $encoding = null): string|bool
mb_language(?string $language = null): string|bool
mb_lcfirst(string $string, ?string $encoding = null): string
mb_list_encodings(): array
mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string
mb_ord(string $string, ?string $encoding = null): int|false
mb_output_handler(string $string, int $status): string
mb_parse_str(string $string, array &$result): bool
mb_preferred_mime_name(string $encoding): string|false
mb_regex_encoding(?string $encoding = null): string|bool
mb_regex_set_options(?string $options = null): string
mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string
mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool
mb_split(string $pattern, string $string, int $limit = -1): array|false
mb_str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string
Expand All @@ -1334,6 +1332,8 @@ class Directory {
mb_substitute_character(string|int|null $substitute_character = null): string|int|bool
mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int
mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): string
mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string
mb_ucfirst(string $string, ?string $encoding = null): string
}
}

Expand All @@ -1347,6 +1347,7 @@ class Directory {
bcadd(string $num1, string $num2, ?int $scale = null): string
bccomp(string $num1, string $num2, ?int $scale = null): int
bcdiv(string $num1, string $num2, ?int $scale = null): string
bcdivmod(string $num1, string $num2, ?int $scale = null): string
bcmod(string $num1, string $num2, ?int $scale = null): string
bcmul(string $num1, string $num2, ?int $scale = null): string
bcpow(string $num, string $exponent, ?int $scale = null): string
Expand Down Expand Up @@ -2485,6 +2486,8 @@ class CURLStringFile {
header(string $header, bool $replace = true, int $response_code = 0): void
headers_list(): array
headers_sent(string &$filename = null, int &$line = null): bool
http_clear_last_response_headers(): void
http_get_last_response_headers(): ?array
http_response_code(int $response_code = 0): int|bool
inet_ntop(string $ip): string|false
inet_pton(string $ip): string|false
Expand All @@ -2493,6 +2496,7 @@ class CURLStringFile {
net_get_interfaces(): array|false
openlog(string $prefix, int $flags, int $facility): bool
pfsockopen(string $hostname, int $port = -1, int &$error_code = null, string &$error_message = null, ?float $timeout = null): resource|false
request_parse_body(?array $options = null): array
setcookie(string $name, string $value = "", int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool
setrawcookie(string $name, string $value = ?, int $expires_or_options = 0, string $path = ?, string $domain = ?, bool $secure = false, bool $httponly = false): bool
socket_get_status()
Expand Down Expand Up @@ -2766,6 +2770,8 @@ interface SessionUpdateTimestampHandlerInterface {
EXTR_IF_EXISTS
EXTR_REFS

array_all(array $array, callable $callback): bool
array_any(array $array, callable $callback): bool
array_change_key_case(array $array, int $case = CASE_LOWER): array
array_chunk(array $array, int $length, bool $preserve_keys = false): array
array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array
Expand All @@ -2779,6 +2785,8 @@ interface SessionUpdateTimestampHandlerInterface {
array_fill_keys(array $keys, mixed $value): array
array_fill(int $start_index, int $count, mixed $value): array
array_filter(array $array, ?callable $callback = null, int $mode = 0): array
array_find(array $array, callable $callback): mixed
array_find_key(array $array, callable $callback): mixed
array_flip(array $array): array
array_intersect_assoc(array $array, array ...$arrays): array
array_intersect_key(array $array, array ...$arrays): array
Expand Down

0 comments on commit 0e19b50

Please sign in to comment.