bug41442.phpt 633 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Bug #41442 (imagegd2() under output control)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!function_exists("imagegd2")) {
  8. die("skip GD2 support unavailable");
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. $str = file_get_contents(__DIR__.'/src.gd2');
  14. $res = imagecreatefromstring($str);
  15. /* string */
  16. ob_start();
  17. imagegd2($res);
  18. $str2 = ob_get_clean();
  19. var_dump(imagecreatefromstring($str2));
  20. /* file */
  21. $file = __DIR__."/bug41442.gd2";
  22. imagegd2($res, $file);
  23. $str2 = file_get_contents($file);
  24. var_dump(imagecreatefromstring($str2));
  25. @unlink($file);
  26. echo "Done\n";
  27. ?>
  28. --EXPECT--
  29. object(GdImage)#2 (0) {
  30. }
  31. object(GdImage)#2 (0) {
  32. }
  33. Done