xref: /PHP-8.4/ext/gd/tests/001-mb.phpt (revision a375d547)
1--TEST--
2imagecreatefrompng() and empty/missing file
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php if (!function_exists("imagecreatefrompng")) print "skip"; ?>
7--FILE--
8<?php
9
10$file = __DIR__."/001私はガラスを食べられます.test";
11@unlink($file);
12
13var_dump(imagecreatefrompng($file));
14touch($file);
15var_dump(imagecreatefrompng($file));
16
17@unlink($file);
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): Failed to open stream: No such file or directory in %s on line %d
23bool(false)
24
25Warning: imagecreatefrompng(): "%s001私はガラスを食べられます.test" is not a valid PNG file in %s on line %d
26bool(false)
27Done
28