1--TEST-- 2Test addcslashes() function (variation 2) 3--INI-- 4precision=14 5--FILE-- 6<?php 7 8$string = "goodyear12345NULL\0truefalse\a\v\f\b\n\r\t"; 9/* charlist "\0..\37" would escape all characters with ASCII code between 0 and 31 */ 10echo "\n*** Testing addcslashes() with ASCII code between 0 and 31 ***\n"; 11var_dump( addcslashes($string, "\0..\37") ); 12 13/* Checking OBJECTS type */ 14echo "\n*** Testing addcslashes() with objects ***\n"; 15class string1 16{ 17 public function __toString() { 18 return "Object"; 19 } 20} 21$obj = new string1; 22var_dump( addcslashes($obj, "b") ); 23 24echo "Done\n"; 25 26?> 27--EXPECTF-- 28*** Testing addcslashes() with ASCII code between 0 and 31 *** 29string(44) "goodyear12345NULL\000truefalse\a\v\f\b\n\r\t" 30 31*** Testing addcslashes() with objects *** 32string(7) "O\bject" 33Done 34