summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/php_functions.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-11-14 09:46:43 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2019-11-15 09:41:10 +0100
commit2de79f085502315d1f53822eee54e9f39dd809f6 (patch)
tree2ccd17381a3acada9c067ae98825c73ea740369a /sapi/apache2handler/php_functions.c
parentd65e59de9b61761c9839ea6379285b10936e03e1 (diff)
downloadphp-git-2de79f085502315d1f53822eee54e9f39dd809f6.tar.gz
Make the $num_points parameter of php_imagepolygon optional
That parameter is mostly useless in practise, and likely has been directly ported from the underlying `gdImagePolygon()` and friends, which require that parameter since the number of elements of the point array would otherwise be unknown. Typical usages of `imagepolygon()`, `imageopenpolygon()` and `imagefilledpolygon()` pass `count($points)/2` or hard-code this value as literal. Since explicitly specifying this parameter is annoying and error-prone, we offer the possibility to omit it, in which case the `$points` array must have an even number of elements, and the number of points is calculated as `count($points)/2`.
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
0 files changed, 0 insertions, 0 deletions