ofs | hex dump | ascii |
---|
0000 | 2d 2d 54 45 53 54 2d 2d 0a 54 65 73 74 20 61 64 64 63 73 6c 61 73 68 65 73 28 29 20 66 75 6e 63 | --TEST--.Test.addcslashes().func |
0020 | 74 69 6f 6e 20 28 76 61 72 69 61 74 69 6f 6e 20 31 29 0a 2d 2d 49 4e 49 2d 2d 0a 70 72 65 63 69 | tion.(variation.1).--INI--.preci |
0040 | 73 69 6f 6e 3d 31 34 0a 2d 2d 46 49 4c 45 2d 2d 0a 3c 3f 70 68 70 0a 0a 65 63 68 6f 20 22 2a 2a | sion=14.--FILE--.<?php..echo."** |
0060 | 2a 20 54 65 73 74 69 6e 67 20 61 64 64 63 73 6c 61 73 68 65 73 28 29 20 66 6f 72 20 62 61 73 69 | *.Testing.addcslashes().for.basi |
0080 | 63 20 6f 70 65 72 61 74 69 6f 6e 73 20 2a 2a 2a 5c 6e 22 3b 0a 2f 2a 20 63 68 65 63 6b 69 6e 67 | c.operations.***\n";./*.checking |
00a0 | 20 6e 6f 72 6d 61 6c 20 6f 70 65 72 61 74 69 6f 6e 20 6f 66 20 61 64 64 63 73 6c 61 73 68 65 73 | .normal.operation.of.addcslashes |
00c0 | 20 2a 2f 0a 24 73 74 72 69 6e 67 20 3d 20 22 67 6f 6f 64 79 65 61 72 31 32 33 34 35 4e 55 4c 4c | .*/.$string.=."goodyear12345NULL |
00e0 | 5c 30 74 72 75 65 66 61 6c 73 65 5c 61 5c 76 5c 66 5c 62 5c 6e 5c 72 5c 74 22 3b 0a 24 63 68 61 | \0truefalse\a\v\f\b\n\r\t";.$cha |
0100 | 72 6c 69 73 74 20 3d 20 61 72 72 61 79 20 28 20 0a 20 20 4e 55 4c 4c 2c 0a 20 20 32 2c 0a 20 20 | rlist.=.array.(....NULL,...2,... |
0120 | 61 72 72 61 79 28 35 2c 36 2c 37 29 2c 0a 20 20 22 61 22 2c 0a 20 20 22 5c 30 22 2c 0a 20 20 22 | array(5,6,7),..."a",..."\0",..." |
0140 | 5c 6e 22 2c 0a 20 20 22 5c 72 22 2c 0a 20 20 22 5c 74 22 2c 0a 20 20 22 5c 61 22 2c 0a 20 20 22 | \n",..."\r",..."\t",..."\a",..." |
0160 | 5c 76 22 2c 0a 20 20 22 5c 62 22 2c 0a 20 20 22 5c 66 22 0a 29 3b 0a 2f 2a 20 6c 6f 6f 70 20 70 | \v",..."\b",..."\f".);./*.loop.p |
0180 | 72 69 6e 74 73 20 73 74 72 69 6e 67 20 77 69 74 68 20 62 61 63 6b 73 6c 61 73 68 65 73 20 62 65 | rints.string.with.backslashes.be |
01a0 | 66 6f 72 65 20 63 68 61 72 61 63 74 65 72 73 0a 20 20 20 6d 65 6e 74 69 6f 6e 65 64 20 69 6e 20 | fore.characters....mentioned.in. |
01c0 | 24 63 68 61 72 20 75 73 69 6e 67 20 61 64 64 63 73 6c 61 73 68 65 73 28 29 20 2a 2f 0a 24 63 6f | $char.using.addcslashes().*/.$co |
01e0 | 75 6e 74 65 72 20 3d 20 31 3b 0a 66 6f 72 65 61 63 68 28 24 63 68 61 72 6c 69 73 74 20 61 73 20 | unter.=.1;.foreach($charlist.as. |
0200 | 24 63 68 61 72 29 20 7b 0a 20 20 65 63 68 6f 20 22 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 24 63 | $char).{...echo."--.Iteration.$c |
0220 | 6f 75 6e 74 65 72 20 2d 2d 5c 6e 22 3b 0a 20 20 76 61 72 5f 64 75 6d 70 28 20 61 64 64 63 73 6c | ounter.--\n";...var_dump(.addcsl |
0240 | 61 73 68 65 73 28 24 73 74 72 69 6e 67 2c 20 24 63 68 61 72 29 20 29 3b 0a 20 20 24 63 6f 75 6e | ashes($string,.$char).);...$coun |
0260 | 74 65 72 2b 2b 3b 0a 7d 0a 0a 65 63 68 6f 20 22 44 6f 6e 65 5c 6e 22 3b 20 0a 0a 3f 3e 0a 2d 2d | ter++;.}..echo."Done\n";...?>.-- |
0280 | 45 58 50 45 43 54 46 2d 2d 0a 2a 2a 2a 20 54 65 73 74 69 6e 67 20 61 64 64 63 73 6c 61 73 68 65 | EXPECTF--.***.Testing.addcslashe |
02a0 | 73 28 29 20 66 6f 72 20 62 61 73 69 63 20 6f 70 65 72 61 74 69 6f 6e 73 20 2a 2a 2a 0a 2d 2d 20 | s().for.basic.operations.***.--. |
02c0 | 49 74 65 72 61 74 69 6f 6e 20 31 20 2d 2d 0a 73 74 72 69 6e 67 28 33 36 29 20 22 67 6f 6f 64 79 | Iteration.1.--.string(36)."goody |
02e0 | 65 61 72 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c 62 0a 0a 09 22 | ear12345NULL.truefalse\a..\b..." |
0300 | 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 32 20 2d 2d 0a 73 74 72 69 6e 67 28 33 37 29 20 22 67 | .--.Iteration.2.--.string(37)."g |
0320 | 6f 6f 64 79 65 61 72 31 5c 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c | oodyear1\2345NULL.truefalse\a..\ |
0340 | 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 33 20 2d 2d 0a 0a 4e 6f 74 69 63 65 3a | b...".--.Iteration.3.--..Notice: |
0360 | 20 41 72 72 61 79 20 74 6f 20 73 74 72 69 6e 67 20 63 6f 6e 76 65 72 73 69 6f 6e 20 69 6e 20 25 | .Array.to.string.conversion.in.% |
0380 | 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 73 74 72 69 6e 67 28 34 32 29 20 22 67 6f 6f 64 5c 79 65 | s.on.line.%d.string(42)."good\ye |
03a0 | 5c 61 5c 72 31 32 33 34 35 4e 55 4c 4c 00 74 5c 72 75 65 66 5c 61 6c 73 65 5c 5c 61 0b 0c 5c 62 | \a\r12345NULL.t\ruef\alse\\a..\b |
03c0 | 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 34 20 2d 2d 0a 73 74 72 69 6e 67 28 33 39 | ...".--.Iteration.4.--.string(39 |
03e0 | 29 20 22 67 6f 6f 64 79 65 5c 61 72 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 5c 61 6c 73 65 | )."goodye\ar12345NULL.truef\alse |
0400 | 5c 5c 61 0b 0c 5c 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 35 20 2d 2d 0a 73 74 | \\a..\b...".--.Iteration.5.--.st |
0420 | 72 69 6e 67 28 33 39 29 20 22 67 6f 6f 64 79 65 61 72 31 32 33 34 35 4e 55 4c 4c 5c 30 30 30 74 | ring(39)."goodyear12345NULL\000t |
0440 | 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 | ruefalse\a..\b...".--.Iteration. |
0460 | 36 20 2d 2d 0a 73 74 72 69 6e 67 28 33 37 29 20 22 67 6f 6f 64 79 65 61 72 31 32 33 34 35 4e 55 | 6.--.string(37)."goodyear12345NU |
0480 | 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c 62 5c 6e 0a 09 22 0a 2d 2d 20 49 74 65 72 61 | LL.truefalse\a..\b\n..".--.Itera |
04a0 | 74 69 6f 6e 20 37 20 2d 2d 0a 73 74 72 69 6e 67 28 33 37 29 20 22 67 6f 6f 64 79 65 61 72 31 32 | tion.7.--.string(37)."goodyear12 |
04c0 | 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c 62 0a 5c 72 09 22 0a 2d 2d 20 | 345NULL.truefalse\a..\b.\r.".--. |
04e0 | 49 74 65 72 61 74 69 6f 6e 20 38 20 2d 2d 0a 73 74 72 69 6e 67 28 33 37 29 20 22 67 6f 6f 64 79 | Iteration.8.--.string(37)."goody |
0500 | 65 61 72 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 0c 5c 62 0a 0a 5c 74 | ear12345NULL.truefalse\a..\b..\t |
0520 | 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 39 20 2d 2d 0a 73 74 72 69 6e 67 28 34 31 29 20 22 | ".--.Iteration.9.--.string(41)." |
0540 | 67 6f 6f 64 79 65 5c 61 72 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 5c 61 6c 73 65 5c 5c 5c | goodye\ar12345NULL.truef\alse\\\ |
0560 | 61 0b 0c 5c 5c 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 31 30 20 2d 2d 0a 73 74 | a..\\b...".--.Iteration.10.--.st |
0580 | 72 69 6e 67 28 33 37 29 20 22 67 6f 6f 64 79 65 61 72 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 | ring(37)."goodyear12345NULL.true |
05a0 | 66 61 6c 73 65 5c 61 5c 76 0c 5c 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 31 31 | false\a\v.\b...".--.Iteration.11 |
05c0 | 20 2d 2d 0a 73 74 72 69 6e 67 28 33 39 29 20 22 67 6f 6f 64 79 65 61 72 31 32 33 34 35 4e 55 4c | .--.string(39)."goodyear12345NUL |
05e0 | 4c 00 74 72 75 65 66 61 6c 73 65 5c 5c 61 0b 0c 5c 5c 5c 62 0a 0a 09 22 0a 2d 2d 20 49 74 65 72 | L.truefalse\\a..\\\b...".--.Iter |
0600 | 61 74 69 6f 6e 20 31 32 20 2d 2d 0a 73 74 72 69 6e 67 28 33 37 29 20 22 67 6f 6f 64 79 65 61 72 | ation.12.--.string(37)."goodyear |
0620 | 31 32 33 34 35 4e 55 4c 4c 00 74 72 75 65 66 61 6c 73 65 5c 61 0b 5c 66 5c 62 0a 0a 09 22 0a 44 | 12345NULL.truefalse\a.\f\b...".D |
0640 | 6f 6e 65 0a | one. |