Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /usr/local/src/libsodium-2.0.23/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/src/libsodium-2.0.23/tests/inc_add.phpt
--TEST--
increment and add edge cases
--SKIPIF--
<?php if (!extension_loaded("sodium")) print "skip"; ?>
--FILE--
<?php

$notStr = 123;
try {
    sodium_increment($notStr);
} catch (SodiumException $e) {
    echo $e->getMessage(), "\n";
}

$str = "abc";
$str2 = $str;
sodium_increment($str);
var_dump($str, $str2);

$str = "ab" . ($x = "c");
$str2 = $str;
sodium_increment($str);
var_dump($str, $str2);

$addStr = "\2\0\0";

$notStr = 123;
try {
    sodium_add($notStr, $addStr);
} catch (SodiumException $e) {
    echo $e->getMessage(), "\n";
}

$str = "abc";
$str2 = $str;
sodium_add($str, $addStr);
var_dump($str, $str2);

$str = "ab" . ($x = "c");
$str2 = $str;
sodium_add($str, $addStr);
var_dump($str, $str2);

?>
--EXPECT--
a PHP string is required
string(3) "bbc"
string(3) "abc"
string(3) "bbc"
string(3) "abc"
PHP strings are required
string(3) "cbc"
string(3) "abc"
string(3) "cbc"
string(3) "abc"

Spamworldpro Mini