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 Concurrent; use Concurrent\Network\Pipe; error_reporting(-1); $chunk =..
Decoded Output download
<?php
namespace Concurrent;
use Concurrent\Network\Pipe;
error_reporting(-1);
$chunk = str_repeat('A', 7000);
list ($a, $b) = Pipe::pair();
Task::async(function () use ($a) {
try {
$len = 0;
while (null !== ($buf = $a->read())) {
$len += strlen($buf);
if ($buf !== str_repeat('A', strlen($buf))) {
throw new \Error('Corrupted data received');
}
}
var_dump($len);
} catch (\Throwable $e) {
echo $e, "\n\n";
} finally {
$a->close();
}
});
try {
for ($i = 0; $i < 1000; $i++) {
$b->write($chunk);
}
} finally {
$b->close();
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Concurrent;
use Concurrent\Network\Pipe;
error_reporting(-1);
$chunk = str_repeat('A', 7000);
list ($a, $b) = Pipe::pair();
Task::async(function () use ($a) {
try {
$len = 0;
while (null !== ($buf = $a->read())) {
$len += strlen($buf);
if ($buf !== str_repeat('A', strlen($buf))) {
throw new \Error('Corrupted data received');
}
}
var_dump($len);
} catch (\Throwable $e) {
echo $e, "\n\n";
} finally {
$a->close();
}
});
try {
for ($i = 0; $i < 1000; $i++) {
$b->write($chunk);
}
} finally {
$b->close();
}
Function Calls
None |
Stats
MD5 | 9f3fee6c26b92bf28cd8ed3f328e626b |
Eval Count | 0 |
Decode Time | 98 ms |