/hphp/test/zend/good/ext/gd/tests/bug66356.php
http://github.com/facebook/hiphop-php · PHP · 22 lines · 11 code · 6 blank · 5 comment · 0 complexity · 05f571581f691045cd3461e5801b18ba MD5 · raw file
- <?hh <<__EntryPoint>> function main(): void {
- $img = imagecreatetruecolor(10, 10);
- // POC #1
- var_dump(imagecrop($img, darray["x" => "a", "y" => 0, "width" => 10, "height" => 10]));
- $arr = darray["x" => "a", "y" => "12b", "width" => 10, "height" => 10];
- var_dump(imagecrop($img, $arr));
- print_r($arr);
- // POC #2
- var_dump(imagecrop($img, darray["x" => 0, "y" => 0, "width" => -1, "height" => 10]));
- // POC #3
- var_dump(imagecrop($img, darray["x" => -20, "y" => -20, "width" => 10, "height" => 10]));
- // POC #4
- var_dump(imagecrop($img, darray["x" => 0x7fffff00, "y" => 0, "width" => 10, "height" => 10]));
- // bug 66815
- var_dump(imagecrop($img, darray["x" => 0, "y" => 0, "width" => 65535, "height" => 65535]));
- }