Download src/php/php-src/ext/gd/tests/001.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gd/tests/001.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/gd/tests/001.phpt
-
curl -L -o 001.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gd/tests/001.phpt
569 Bytes
| --TEST-- | |
| imagecreatefrompng() and empty/missing file | |
| --EXTENSIONS-- | |
| gd | |
| --SKIPIF-- | |
| if (!function_exists("imagecreatefrompng")) print "skip"; | |
| --FILE-- | |
| $file = __DIR__."/001.test"; | |
| @unlink($file); | |
| var_dump(imagecreatefrompng($file)); | |
| touch($file); | |
| var_dump(imagecreatefrompng($file)); | |
| @unlink($file); | |
| echo "Done\n"; | |
| --EXPECTF-- | |
| Warning: imagecreatefrompng(%s001.test): Failed to open stream: No such file or directory in %s on line %d | |
| bool(false) | |
| Warning: imagecreatefrompng(): "%s001.test" is not a valid PNG file in %s on line %d | |
| bool(false) | |
| Done | |