1--TEST-- 2Bug #79615 (Wrong GIF header written in GD GIFEncode) 3--EXTENSIONS-- 4gd 5--FILE-- 6<?php 7$im = imagecreate(3, 3); // 3x3, 9 colors, 4 bits per pixel 8for ($x = 0; $x < 3; $x++) { 9 for ($y = 0; $y < 3; $y++) { 10 imagesetpixel($im, $x, $y, imagecolorallocate($im, $x, $y, 0)); 11 } 12} 13ob_start(); 14imagegif($im); 15echo decbin(ord(ob_get_clean()[0xA])); 16?> 17--EXPECT-- 1810110011 19