: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (class_exists('ParagonIE_Sodium_Core_Curve25519_Fe', false)) {
* Class ParagonIE_Sodium_Core_Curve25519_Fe
* This represents a Field Element
class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess
protected $container = array();
* @internal You should not use this directly from another application
* @param array<int, int> $array
* @param bool $save_indexes
public static function fromArray($array, $save_indexes = null)
$keys = array_keys($array);
$keys = range(0, $count - 1);
$array = array_values($array);
/** @var array<int, int> $keys */
$obj = new ParagonIE_Sodium_Core_Curve25519_Fe();
for ($i = 0; $i < $count; ++$i) {
$obj->offsetSet($keys[$i], $array[$i]);
for ($i = 0; $i < $count; ++$i) {
$obj->offsetSet($i, $array[$i]);
* @internal You should not use this directly from another application
* @param int|null $offset
* @psalm-suppress MixedArrayOffset
public function offsetSet($offset, $value)
throw new InvalidArgumentException('Expected an integer');
$this->container[] = $value;
$this->container[$offset] = $value;
* @internal You should not use this directly from another application
* @psalm-suppress MixedArrayOffset
public function offsetExists($offset)
return isset($this->container[$offset]);
* @internal You should not use this directly from another application
* @psalm-suppress MixedArrayOffset
public function offsetUnset($offset)
unset($this->container[$offset]);
* @internal You should not use this directly from another application
* @psalm-suppress MixedArrayOffset
public function offsetGet($offset)
if (!isset($this->container[$offset])) {
$this->container[$offset] = 0;
return (int) ($this->container[$offset]);
* @internal You should not use this directly from another application
public function __debugInfo()
return array(implode(', ', $this->container));