1--TEST--
2Test chop() function : basic functionality
3--FILE--
4<?php
5/*
6 * Testing chop(): basic functionality
7*/
8
9echo "*** Testing chop() : basic functionality ***\n";
10
11// Initialize all required variables
12$str = "hello world\t\n\r\0\x0B  ";
13$charlist = 'dl ';
14
15// Calling chop() with default arguments
16var_dump( chop($str) );
17
18// Calling chop() with all arguments
19var_dump( chop($str, $charlist) );
20
21// Calling chop() with the charlist not present at the end of input string
22var_dump( chop($str, '!') );
23
24echo "Done\n";
25?>
26--EXPECTF--
27*** Testing chop() : basic functionality ***
28string(11) "hello world"
29string(16) "hello world
30
30%0"
31string(18) "hello world
32
32%0  "
33Done
34