1--TEST-- 2Test base64_encode() function : basic functionality 3--FILE-- 4<?php 5/* 6 * Test base64_encode with single byte values. 7 */ 8 9echo "*** Testing base64_encode() : basic functionality ***\n"; 10 11for ($i=0; $i<256; $i++) { 12 $str = pack("c", $i); 13 $enc = base64_encode($str); 14 printf("0x%X: %s\n", $i, $enc); 15} 16 17echo "Done"; 18?> 19--EXPECT-- 20*** Testing base64_encode() : basic functionality *** 210x0: AA== 220x1: AQ== 230x2: Ag== 240x3: Aw== 250x4: BA== 260x5: BQ== 270x6: Bg== 280x7: Bw== 290x8: CA== 300x9: CQ== 310xA: Cg== 320xB: Cw== 330xC: DA== 340xD: DQ== 350xE: Dg== 360xF: Dw== 370x10: EA== 380x11: EQ== 390x12: Eg== 400x13: Ew== 410x14: FA== 420x15: FQ== 430x16: Fg== 440x17: Fw== 450x18: GA== 460x19: GQ== 470x1A: Gg== 480x1B: Gw== 490x1C: HA== 500x1D: HQ== 510x1E: Hg== 520x1F: Hw== 530x20: IA== 540x21: IQ== 550x22: Ig== 560x23: Iw== 570x24: JA== 580x25: JQ== 590x26: Jg== 600x27: Jw== 610x28: KA== 620x29: KQ== 630x2A: Kg== 640x2B: Kw== 650x2C: LA== 660x2D: LQ== 670x2E: Lg== 680x2F: Lw== 690x30: MA== 700x31: MQ== 710x32: Mg== 720x33: Mw== 730x34: NA== 740x35: NQ== 750x36: Ng== 760x37: Nw== 770x38: OA== 780x39: OQ== 790x3A: Og== 800x3B: Ow== 810x3C: PA== 820x3D: PQ== 830x3E: Pg== 840x3F: Pw== 850x40: QA== 860x41: QQ== 870x42: Qg== 880x43: Qw== 890x44: RA== 900x45: RQ== 910x46: Rg== 920x47: Rw== 930x48: SA== 940x49: SQ== 950x4A: Sg== 960x4B: Sw== 970x4C: TA== 980x4D: TQ== 990x4E: Tg== 1000x4F: Tw== 1010x50: UA== 1020x51: UQ== 1030x52: Ug== 1040x53: Uw== 1050x54: VA== 1060x55: VQ== 1070x56: Vg== 1080x57: Vw== 1090x58: WA== 1100x59: WQ== 1110x5A: Wg== 1120x5B: Ww== 1130x5C: XA== 1140x5D: XQ== 1150x5E: Xg== 1160x5F: Xw== 1170x60: YA== 1180x61: YQ== 1190x62: Yg== 1200x63: Yw== 1210x64: ZA== 1220x65: ZQ== 1230x66: Zg== 1240x67: Zw== 1250x68: aA== 1260x69: aQ== 1270x6A: ag== 1280x6B: aw== 1290x6C: bA== 1300x6D: bQ== 1310x6E: bg== 1320x6F: bw== 1330x70: cA== 1340x71: cQ== 1350x72: cg== 1360x73: cw== 1370x74: dA== 1380x75: dQ== 1390x76: dg== 1400x77: dw== 1410x78: eA== 1420x79: eQ== 1430x7A: eg== 1440x7B: ew== 1450x7C: fA== 1460x7D: fQ== 1470x7E: fg== 1480x7F: fw== 1490x80: gA== 1500x81: gQ== 1510x82: gg== 1520x83: gw== 1530x84: hA== 1540x85: hQ== 1550x86: hg== 1560x87: hw== 1570x88: iA== 1580x89: iQ== 1590x8A: ig== 1600x8B: iw== 1610x8C: jA== 1620x8D: jQ== 1630x8E: jg== 1640x8F: jw== 1650x90: kA== 1660x91: kQ== 1670x92: kg== 1680x93: kw== 1690x94: lA== 1700x95: lQ== 1710x96: lg== 1720x97: lw== 1730x98: mA== 1740x99: mQ== 1750x9A: mg== 1760x9B: mw== 1770x9C: nA== 1780x9D: nQ== 1790x9E: ng== 1800x9F: nw== 1810xA0: oA== 1820xA1: oQ== 1830xA2: og== 1840xA3: ow== 1850xA4: pA== 1860xA5: pQ== 1870xA6: pg== 1880xA7: pw== 1890xA8: qA== 1900xA9: qQ== 1910xAA: qg== 1920xAB: qw== 1930xAC: rA== 1940xAD: rQ== 1950xAE: rg== 1960xAF: rw== 1970xB0: sA== 1980xB1: sQ== 1990xB2: sg== 2000xB3: sw== 2010xB4: tA== 2020xB5: tQ== 2030xB6: tg== 2040xB7: tw== 2050xB8: uA== 2060xB9: uQ== 2070xBA: ug== 2080xBB: uw== 2090xBC: vA== 2100xBD: vQ== 2110xBE: vg== 2120xBF: vw== 2130xC0: wA== 2140xC1: wQ== 2150xC2: wg== 2160xC3: ww== 2170xC4: xA== 2180xC5: xQ== 2190xC6: xg== 2200xC7: xw== 2210xC8: yA== 2220xC9: yQ== 2230xCA: yg== 2240xCB: yw== 2250xCC: zA== 2260xCD: zQ== 2270xCE: zg== 2280xCF: zw== 2290xD0: 0A== 2300xD1: 0Q== 2310xD2: 0g== 2320xD3: 0w== 2330xD4: 1A== 2340xD5: 1Q== 2350xD6: 1g== 2360xD7: 1w== 2370xD8: 2A== 2380xD9: 2Q== 2390xDA: 2g== 2400xDB: 2w== 2410xDC: 3A== 2420xDD: 3Q== 2430xDE: 3g== 2440xDF: 3w== 2450xE0: 4A== 2460xE1: 4Q== 2470xE2: 4g== 2480xE3: 4w== 2490xE4: 5A== 2500xE5: 5Q== 2510xE6: 5g== 2520xE7: 5w== 2530xE8: 6A== 2540xE9: 6Q== 2550xEA: 6g== 2560xEB: 6w== 2570xEC: 7A== 2580xED: 7Q== 2590xEE: 7g== 2600xEF: 7w== 2610xF0: 8A== 2620xF1: 8Q== 2630xF2: 8g== 2640xF3: 8w== 2650xF4: 9A== 2660xF5: 9Q== 2670xF6: 9g== 2680xF7: 9w== 2690xF8: +A== 2700xF9: +Q== 2710xFA: +g== 2720xFB: +w== 2730xFC: /A== 2740xFD: /Q== 2750xFE: /g== 2760xFF: /w== 277Done 278