Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Phar object passed URL --INI-- default_charset=UTF-8 --EXTENSIONS-- phar --FILE--..

Decoded Output download

--TEST--
Phar object passed URL
--INI--
default_charset=UTF-8
--EXTENSIONS--
phar
--FILE--
<?php
try {
    $a = new Phar('http://should.fail.com');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"
";
}
try {
    $a = new Phar('http://');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"
";
}
try {
    $a = new Phar('http:/');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"
";
}
?>
--EXPECT--
Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files
Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files
Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist

Did this file decode correctly?

Original Code

--TEST--
Phar object passed URL
--INI--
default_charset=UTF-8
--EXTENSIONS--
phar
--FILE--
<?php
try {
    $a = new Phar('http://should.fail.com');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"\n";
}
try {
    $a = new Phar('http://');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"\n";
}
try {
    $a = new Phar('http:/');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(),"\n";
}
?>
--EXPECT--
Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files
Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files
Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist

Function Calls

None

Variables

None

Stats

MD5 893d9df983a75b41e8519843eb77004f
Eval Count 0
Decode Time 104 ms