Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace PHP\Collection; class DictionaryEnumerator implements Enumerator { ..
Decoded Output download
<?php
namespace PHP\Collection;
class DictionaryEnumerator implements Enumerator {
/**
* @var \ArrayIterator
*/
private $inner;
function __construct(array $storage) {
$this->inner = new \ArrayIterator($storage);
}
function isEmpty(): bool {
return $this->inner->count() === 0;
}
/**
* @param callable $f ($value): mixed
* @return Collection
*/
function map(callable $f) {
return new MappingEnumerator($this, $f);
}
/**
* @param callable $f ($value): bool
* @return Collection
*/
function filter(callable $f) {
return new FilteringEnumerator($this, $f);
}
/**
* @link http://php.net/manual/en/iterator.current.php
* @return mixed
*/
public function current() {
$entry = $this->inner->current();
return $entry[1];
}
/**
* @link http://php.net/manual/en/iterator.next.php
* @return void
*/
public function next() {
$this->inner->next();
}
/**
* @link http://php.net/manual/en/iterator.key.php
* @return mixed
*/
public function key() {
$entry = $this->inner->current();
return $entry[0];
}
public function valid(): bool {
return $this->inner->valid();
}
/**
* @link http://php.net/manual/en/iterator.rewind.php
* @return void
*/
public function rewind() {
$this->inner->rewind();
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace PHP\Collection;
class DictionaryEnumerator implements Enumerator {
/**
* @var \ArrayIterator
*/
private $inner;
function __construct(array $storage) {
$this->inner = new \ArrayIterator($storage);
}
function isEmpty(): bool {
return $this->inner->count() === 0;
}
/**
* @param callable $f ($value): mixed
* @return Collection
*/
function map(callable $f) {
return new MappingEnumerator($this, $f);
}
/**
* @param callable $f ($value): bool
* @return Collection
*/
function filter(callable $f) {
return new FilteringEnumerator($this, $f);
}
/**
* @link http://php.net/manual/en/iterator.current.php
* @return mixed
*/
public function current() {
$entry = $this->inner->current();
return $entry[1];
}
/**
* @link http://php.net/manual/en/iterator.next.php
* @return void
*/
public function next() {
$this->inner->next();
}
/**
* @link http://php.net/manual/en/iterator.key.php
* @return mixed
*/
public function key() {
$entry = $this->inner->current();
return $entry[0];
}
public function valid(): bool {
return $this->inner->valid();
}
/**
* @link http://php.net/manual/en/iterator.rewind.php
* @return void
*/
public function rewind() {
$this->inner->rewind();
}
}
Function Calls
None |
Stats
MD5 | aee648ec3430cd3e1abc5ffc6acf0c4b |
Eval Count | 0 |
Decode Time | 80 ms |