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 declare(strict_types=1); /** * This file is part of the Carbon package. * * (c)..
Decoded Output download
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$files = [
__DIR__.'/../src/Carbon/Traits/Date.php',
__DIR__.'/../src/Carbon/Traits/Units.php',
__DIR__.'/../src/Carbon/Lang/fr.php',
];
$comments = [
'// @--property',
'// @property',
'// @call ',
'// Words with feminine grammatical gender: semaine',
];
foreach ($files as $file) {
$contents = str_replace("
", '', file_get_contents($file));
$newContents = implode("
", array_filter(explode("
", $contents), static function ($line) use ($comments) {
$code = trim($line);
foreach ($comments as $comment) {
if (str_starts_with($code, $comment)) {
return false;
}
}
return true;
}));
if ($newContents !== $contents) {
file_put_contents($file, $newContents);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$files = [
__DIR__.'/../src/Carbon/Traits/Date.php',
__DIR__.'/../src/Carbon/Traits/Units.php',
__DIR__.'/../src/Carbon/Lang/fr.php',
];
$comments = [
'// @--property',
'// @property',
'// @call ',
'// Words with feminine grammatical gender: semaine',
];
foreach ($files as $file) {
$contents = str_replace("\r", '', file_get_contents($file));
$newContents = implode("\n", array_filter(explode("\n", $contents), static function ($line) use ($comments) {
$code = trim($line);
foreach ($comments as $comment) {
if (str_starts_with($code, $comment)) {
return false;
}
}
return true;
}));
if ($newContents !== $contents) {
file_put_contents($file, $newContents);
}
}
Function Calls
None |
Stats
MD5 | f68f08e4ef3c0756299d279905101c8e |
Eval Count | 0 |
Decode Time | 98 ms |