PHP 8.5.0 Alpha 1 available for testing

Voting

: six plus zero?
(Example: nine)

The Note You're Voting On

mark at manngo dot net
3 years ago
Note that as of PHP 8.1, you will get deprecated errors if the arguments are floating point. You will save yourself a lot of angst if you cast the arguments:

<?php
imagecopyresampled
(
$dst_image, $src_image,
(int)
$dst_x, (int) $dst_y,
(int)
$src_x, (int) $src_y,
(int)
$dst_width, (int) $dst_height,
(int)
$src_width, (int) $src_height
);
?>

You could also have rounded them off, but I think casting them is truer to the original behaviour.

<< Back to user notes page

To Top