@@ -24,36 +24,41 @@ function xcheck_var($var, $recursive=true) {
2424}
2525
2626
27+ function repr ($ var ) {
28+ return addcslashes (var_export ($ var , true ), "\n\r\t" );
29+ }
30+
31+
2732function echo_handler ($ string ) {
2833 if (is_string ($ string ) && xcheck ($ string )) {
29- echo "echo_handler:xmark: " .json_encode ($ string )." " .xcheck ($ string )."\n" ;
34+ echo "echo_handler:xmark: " .repr ($ string )." " .xcheck ($ string )."\n" ;
3035 }
3136}
3237
3338function exit_handler ($ string ) {
3439 if (is_string ($ string ) && xcheck ($ string )) {
35- echo "exit_handler:xmark: " .json_encode ($ string )." " .xcheck ($ string )."\n" ;
40+ echo "exit_handler:xmark: " .repr ($ string )." " .xcheck ($ string )."\n" ;
3641 }
3742}
3843
3944function init_user_dynamic_call_handler ($ funcname ) {
4045 if (is_string ($ funcname )) {
4146 if (xcheck ($ funcname )) {
42- echo "init_user_dynamic_call_handler:xcheck: " .json_encode ($ funcname )." " .xcheck ($ funcname )."\n" ;
47+ echo "init_user_dynamic_call_handler:xcheck: " .repr ($ funcname )." " .xcheck ($ funcname )."\n" ;
4348 }
4449 } else if (is_array ($ funcname )) {
4550 if (xcheck ($ funcname [0 ])) {
46- echo "init_user_dynamic_call_handler:xcheck: " .json_encode ($ funcname [0 ])." " .xcheck ($ funcname [0 ])."\n" ;
51+ echo "init_user_dynamic_call_handler:xcheck: " .repr ($ funcname [0 ])." " .xcheck ($ funcname [0 ])."\n" ;
4752 }
4853 if (xcheck ($ funcname [1 ])) {
49- echo "init_user_dynamic_call_handler:xcheck: " .json_encode ($ funcname [1 ])." " .xcheck ($ funcname [1 ])."\n" ;
54+ echo "init_user_dynamic_call_handler:xcheck: " .repr ($ funcname [1 ])." " .xcheck ($ funcname [1 ])."\n" ;
5055 }
5156 }
5257}
5358
5459function include_or_eval_handler ($ param ) {
5560 if (xcheck ($ param )) {
56- echo "include_or_eval_handler:xmark: " .json_encode ($ param )." " .xcheck ($ param )."\n" ;
61+ echo "include_or_eval_handler:xmark: " .repr ($ param )." " .xcheck ($ param )."\n" ;
5762 }
5863}
5964
0 commit comments