summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/chop_basic.phpt
blob: c9302a80ae41366f156827c710c4b76bb1dc850b (plain)
ofshex dumpascii
0000 2d 2d 54 45 53 54 2d 2d 0a 54 65 73 74 20 63 68 6f 70 28 29 20 66 75 6e 63 74 69 6f 6e 20 3a 20 --TEST--.Test.chop().function.:.
0020 62 61 73 69 63 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 0a 2d 2d 46 49 4c 45 2d 2d 0a 3c 3f 70 basic.functionality.--FILE--.<?p
0040 68 70 0a 2f 2a 0a 20 2a 20 54 65 73 74 69 6e 67 20 63 68 6f 70 28 29 3a 20 62 61 73 69 63 20 66 hp./*..*.Testing.chop():.basic.f
0060 75 6e 63 74 69 6f 6e 61 6c 69 74 79 0a 2a 2f 0a 0a 65 63 68 6f 20 22 2a 2a 2a 20 54 65 73 74 69 unctionality.*/..echo."***.Testi
0080 6e 67 20 63 68 6f 70 28 29 20 3a 20 62 61 73 69 63 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 ng.chop().:.basic.functionality.
00a0 2a 2a 2a 5c 6e 22 3b 0a 0a 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 20 61 6c 6c 20 72 65 71 75 69 ***\n";..//.Initialize.all.requi
00c0 72 65 64 20 76 61 72 69 61 62 6c 65 73 0a 24 73 74 72 20 3d 20 22 68 65 6c 6c 6f 20 77 6f 72 6c red.variables.$str.=."hello.worl
00e0 64 5c 74 5c 6e 5c 72 5c 30 5c 78 30 42 20 20 22 3b 0a 24 63 68 61 72 6c 69 73 74 20 3d 20 27 64 d\t\n\r\0\x0B..";.$charlist.=.'d
0100 6c 20 27 3b 0a 0a 2f 2f 20 43 61 6c 6c 69 6e 67 20 63 68 6f 70 28 29 20 77 69 74 68 20 64 65 66 l.';..//.Calling.chop().with.def
0120 61 75 6c 74 20 61 72 67 75 6d 65 6e 74 73 0a 76 61 72 5f 64 75 6d 70 28 20 63 68 6f 70 28 24 73 ault.arguments.var_dump(.chop($s
0140 74 72 29 20 29 3b 0a 0a 2f 2f 20 43 61 6c 6c 69 6e 67 20 63 68 6f 70 28 29 20 77 69 74 68 20 61 tr).);..//.Calling.chop().with.a
0160 6c 6c 20 61 72 67 75 6d 65 6e 74 73 0a 76 61 72 5f 64 75 6d 70 28 20 63 68 6f 70 28 24 73 74 72 ll.arguments.var_dump(.chop($str
0180 2c 20 24 63 68 61 72 6c 69 73 74 29 20 29 3b 0a 0a 2f 2f 20 43 61 6c 6c 69 6e 67 20 63 68 6f 70 ,.$charlist).);..//.Calling.chop
01a0 28 29 20 77 69 74 68 20 74 68 65 20 63 68 61 72 6c 69 73 74 20 6e 6f 74 20 70 72 65 73 65 6e 74 ().with.the.charlist.not.present
01c0 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 69 6e 70 75 74 20 73 74 72 69 6e 67 0a 76 61 72 5f .at.the.end.of.input.string.var_
01e0 64 75 6d 70 28 20 63 68 6f 70 28 24 73 74 72 2c 20 27 21 27 29 20 29 3b 0a 0a 65 63 68 6f 20 22 dump(.chop($str,.'!').);..echo."
0200 44 6f 6e 65 5c 6e 22 3b 0a 3f 3e 0a 2d 2d 45 58 50 45 43 54 2d 2d 0a 2a 2a 2a 20 54 65 73 74 69 Done\n";.?>.--EXPECT--.***.Testi
0220 6e 67 20 63 68 6f 70 28 29 20 3a 20 62 61 73 69 63 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 ng.chop().:.basic.functionality.
0240 2a 2a 2a 0a 73 74 72 69 6e 67 28 31 31 29 20 22 68 65 6c 6c 6f 20 77 6f 72 6c 64 22 0a 73 74 72 ***.string(11)."hello.world".str
0260 69 6e 67 28 31 36 29 20 22 68 65 6c 6c 6f 20 77 6f 72 6c 64 09 0a 0d 00 0b 22 0a 73 74 72 69 6e ing(16)."hello.world.....".strin
0280 67 28 31 38 29 20 22 68 65 6c 6c 6f 20 77 6f 72 6c 64 09 0a 0d 00 0b 20 20 22 0a 44 6f 6e 65 0a g(18)."hello.world.......".Done.