Skip to content

Commit aab612d

Browse files
committed
Updating functions list with new documentation
1 parent c775abf commit aab612d

15 files changed

+328
-224
lines changed

generated/filesystem.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,8 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $
755755
* @param string $enclosure The optional enclosure parameter sets the field
756756
* enclosure (one character only).
757757
* @param string $escape_char The optional escape_char parameter sets the
758-
* escape character (one character only).
758+
* escape character (at most one character).
759+
* An empty string ("") disables the proprietary escape mechanism.
759760
* @return int Returns the length of the written string .
760761
* @throws FilesystemException
761762
*
@@ -1305,10 +1306,6 @@ function tempnam(string $dir, string $prefix): string
13051306
* the file handle returned by tmpfile), or when the
13061307
* script ends.
13071308
*
1308-
* For details, consult your system documentation on the
1309-
* tmpfile(3) function, as well as the
1310-
* stdio.h header file.
1311-
*
13121309
* @return resource Returns a file handle, similar to the one returned by
13131310
* fopen, for the new file .
13141311
* @throws FilesystemException

generated/funchand.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,16 @@ function forward_static_call_array(callable $function, array $parameters)
8787
* @param callable $function The function or method to be called. This parameter may be an array,
8888
* with the name of the class, and the method, or a string, with a function
8989
* name.
90-
* @param mixed $parameter Zero or more parameters to be passed to the function.
91-
* @param mixed $params
90+
* @param mixed $params Zero or more parameters to be passed to the function.
9291
* @return mixed Returns the function result, .
9392
* @throws FunchandException
9493
*
9594
*/
96-
function forward_static_call(callable $function, $parameter = null, ...$params)
95+
function forward_static_call(callable $function, ...$params)
9796
{
9897
error_clear_last();
9998
if ($params !== []) {
100-
$result = \forward_static_call($function, $parameter, ...$params);
101-
} elseif ($parameter !== null) {
102-
$result = \forward_static_call($function, $parameter);
99+
$result = \forward_static_call($function, ...$params);
103100
} else {
104101
$result = \forward_static_call($function);
105102
}
@@ -115,18 +112,15 @@ function forward_static_call(callable $function, $parameter = null, ...$params)
115112
*
116113
* @param callable $function The function name as a string, or an array consisting of an object and
117114
* a method.
118-
* @param mixed $arg
119115
* @param mixed $params
120116
* @throws FunchandException
121117
*
122118
*/
123-
function register_tick_function(callable $function, $arg = null, ...$params): void
119+
function register_tick_function(callable $function, ...$params): void
124120
{
125121
error_clear_last();
126122
if ($params !== []) {
127-
$result = \register_tick_function($function, $arg, ...$params);
128-
} elseif ($arg !== null) {
129-
$result = \register_tick_function($function, $arg);
123+
$result = \register_tick_function($function, ...$params);
130124
} else {
131125
$result = \register_tick_function($function);
132126
}

generated/functionsList.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@
297297
'imagepng',
298298
'imagepolygon',
299299
'imagerectangle',
300-
'imageresolution',
301300
'imagerotate',
302301
'imagesavealpha',
303302
'imagescale',
@@ -379,11 +378,14 @@
379378
'inotify_rm_watch',
380379
'json_encode',
381380
'json_last_error_msg',
381+
'ldap_add_ext',
382382
'ldap_add',
383+
'ldap_bind_ext',
383384
'ldap_bind',
384385
'ldap_control_paged_result_response',
385386
'ldap_control_paged_result',
386387
'ldap_count_entries',
388+
'ldap_delete_ext',
387389
'ldap_delete',
388390
'ldap_exop_passwd',
389391
'ldap_exop_whoami',
@@ -399,14 +401,18 @@
399401
'ldap_get_values_len',
400402
'ldap_get_values',
401403
'ldap_list',
404+
'ldap_mod_add_ext',
402405
'ldap_mod_add',
406+
'ldap_mod_del_ext',
403407
'ldap_mod_del',
408+
'ldap_mod_replace_ext',
404409
'ldap_mod_replace',
405410
'ldap_modify_batch',
406411
'ldap_next_attribute',
407412
'ldap_parse_exop',
408413
'ldap_parse_result',
409414
'ldap_read',
415+
'ldap_rename_ext',
410416
'ldap_rename',
411417
'ldap_sasl_bind',
412418
'ldap_search',
@@ -568,8 +574,10 @@
568574
'oci_rollback',
569575
'oci_server_version',
570576
'oci_set_action',
577+
'oci_set_call_timeout',
571578
'oci_set_client_identifier',
572579
'oci_set_client_info',
580+
'oci_set_db_operation',
573581
'oci_set_edition',
574582
'oci_set_module_name',
575583
'oci_set_prefetch',

generated/image.php

Lines changed: 13 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,11 @@ function imagecrop($image, array $rect)
603603
* @param float $threshold
604604
* @param int $color
605605
* @return resource Returns a cropped image resource on success .
606-
* If no cropping would occur, or the complete image would be cropped, that is
607-
* treated as failure, i.e. imagecrop returns FALSE.
606+
* If the complete image was cropped, imagecrop returns FALSE.
608607
* @throws ImageException
609608
*
610609
*/
611-
function imagecropauto($image, int $mode = -1, float $threshold = .5, int $color = -1)
610+
function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = .5, int $color = -1)
612611
{
613612
error_clear_last();
614613
$result = \imagecropauto($image, $mode, $threshold, $color);
@@ -1155,11 +1154,7 @@ function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2
11551154
function imagegif($image, $to = null): void
11561155
{
11571156
error_clear_last();
1158-
if ($to !== null) {
1159-
$result = \imagegif($image, $to);
1160-
} else {
1161-
$result = \imagegif($image);
1162-
}
1157+
$result = \imagegif($image, $to);
11631158
if ($result === false) {
11641159
throw ImageException::createFromPhpError();
11651160
}
@@ -1211,25 +1206,16 @@ function imagegrabwindow(int $window_handle, int $client_area = 0)
12111206
* @param resource $image An image resource, returned by one of the image creation functions,
12121207
* such as imagecreatetruecolor.
12131208
* @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
1214-
*
1215-
* To skip this argument in order to provide the
1216-
* quality parameter, use NULL.
12171209
* @param int $quality quality is optional, and ranges from 0 (worst
12181210
* quality, smaller file) to 100 (best quality, biggest file). The
1219-
* default is the default IJG quality value (about 75).
1211+
* default (-1) uses the default IJG quality value (about 75).
12201212
* @throws ImageException
12211213
*
12221214
*/
1223-
function imagejpeg($image, $to = null, int $quality = null): void
1215+
function imagejpeg($image, $to = null, int $quality = -1): void
12241216
{
12251217
error_clear_last();
1226-
if ($quality !== null) {
1227-
$result = \imagejpeg($image, $to, $quality);
1228-
} elseif ($to !== null) {
1229-
$result = \imagejpeg($image, $to);
1230-
} else {
1231-
$result = \imagejpeg($image);
1232-
}
1218+
$result = \imagejpeg($image, $to, $quality);
12331219
if ($result === false) {
12341220
throw ImageException::createFromPhpError();
12351221
}
@@ -1447,28 +1433,22 @@ function imageopenpolygon($image, array $points, int $num_points, int $color): v
14471433
*
14481434
* NULL is invalid if the quality and
14491435
* filters arguments are not used.
1450-
* @param int $quality Compression level: from 0 (no compression) to 9. The current default is 6.
1436+
* @param int $quality Compression level: from 0 (no compression) to 9.
1437+
* The default (-1) uses the zlib compression default.
14511438
* For more information see the zlib manual.
14521439
* @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be
14531440
* set to any combination of the PNG_FILTER_XXX
14541441
* constants. PNG_NO_FILTER or
14551442
* PNG_ALL_FILTERS may also be used to respectively
14561443
* disable or activate all filters.
1444+
* The default value (-1) disables filtering.
14571445
* @throws ImageException
14581446
*
14591447
*/
1460-
function imagepng($image, $to = null, int $quality = null, int $filters = null): void
1448+
function imagepng($image, $to = null, int $quality = -1, int $filters = -1): void
14611449
{
14621450
error_clear_last();
1463-
if ($filters !== null) {
1464-
$result = \imagepng($image, $to, $quality, $filters);
1465-
} elseif ($quality !== null) {
1466-
$result = \imagepng($image, $to, $quality);
1467-
} elseif ($to !== null) {
1468-
$result = \imagepng($image, $to);
1469-
} else {
1470-
$result = \imagepng($image);
1471-
}
1451+
$result = \imagepng($image, $to, $quality, $filters);
14721452
if ($result === false) {
14731453
throw ImageException::createFromPhpError();
14741454
}
@@ -1544,48 +1524,6 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color):
15441524
}
15451525

15461526

1547-
/**
1548-
* imageresolution allows to set and get the resolution of
1549-
* an image in DPI (dots per inch). If none of the optional parameters is given,
1550-
* the current resolution is returned as indexed array. If only
1551-
* res_x is given, the horizontal and vertical resolution
1552-
* are set to this value. If both optional parameters are given, the horizontal
1553-
* and vertical resolution are set to these values, respectively.
1554-
*
1555-
* The resolution is only used as meta information when images are read from and
1556-
* written to formats supporting this kind of information (curently PNG and
1557-
* JPEG). It does not affect any drawing operations. The default resolution
1558-
* for new images is 96 DPI.
1559-
*
1560-
* @param resource $image An image resource, returned by one of the image creation functions,
1561-
* such as imagecreatetruecolor.
1562-
* @param int $res_x The horizontal resolution in DPI.
1563-
* @param int $res_y The vertical resolution in DPI.
1564-
* @return mixed When used as getter (that is without the optional parameters), it returns
1565-
* TRUE on success, .
1566-
* When used as setter (that is with one or both optional parameters given),
1567-
* it returns an indexed array of the horizontal and vertical resolution on
1568-
* success, .
1569-
* @throws ImageException
1570-
*
1571-
*/
1572-
function imageresolution($image, int $res_x = null, int $res_y = null)
1573-
{
1574-
error_clear_last();
1575-
if ($res_y !== null) {
1576-
$result = \imageresolution($image, $res_x, $res_y);
1577-
} elseif ($res_x !== null) {
1578-
$result = \imageresolution($image, $res_x);
1579-
} else {
1580-
$result = \imageresolution($image);
1581-
}
1582-
if ($result === false) {
1583-
throw ImageException::createFromPhpError();
1584-
}
1585-
return $result;
1586-
}
1587-
1588-
15891527
/**
15901528
* Rotates the image image using the given
15911529
* angle in degrees.
@@ -2258,10 +2196,8 @@ function imagewbmp($image, $to = null, int $foreground = null): void
22582196
error_clear_last();
22592197
if ($foreground !== null) {
22602198
$result = \imagewbmp($image, $to, $foreground);
2261-
} elseif ($to !== null) {
2262-
$result = \imagewbmp($image, $to);
22632199
} else {
2264-
$result = \imagewbmp($image);
2200+
$result = \imagewbmp($image, $to);
22652201
}
22662202
if ($result === false) {
22672203
throw ImageException::createFromPhpError();
@@ -2310,7 +2246,7 @@ function imagewebp($image, $to = null, int $quality = 80): void
23102246
* @throws ImageException
23112247
*
23122248
*/
2313-
function imagexbm($image, ?string $filename, int $foreground = null): void
2249+
function imagexbm($image, ?string $filename = null, int $foreground = null): void
23142250
{
23152251
error_clear_last();
23162252
if ($foreground !== null) {

generated/json.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* JSON_PRESERVE_ZERO_FRACTION,
3131
* JSON_UNESCAPED_UNICODE,
3232
* JSON_PARTIAL_OUTPUT_ON_ERROR,
33+
* JSON_UNESCAPED_LINE_TERMINATORS,
3334
* JSON_THROW_ON_ERROR. The behaviour of these
3435
* constants is described on the
3536
* JSON constants page.

0 commit comments

Comments
 (0)