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-- Using imports, comma and aliases --SKIPIF-- <?php include(__DIR__ . '/../skipif.i..
Decoded Output download
--TEST--
Using imports, comma and aliases
--SKIPIF--
<?php include(__DIR__ . '/../skipif.inc'); ?>
--FILE--
<?php
$code =<<<ZEP
namespace Example;
use Foo as Baz, Bar as Buz;
ZEP;
var_dump(zephir_parse_file($code, '(eval code)'));
?>
--EXPECT--
array(2) {
[0]=>
array(5) {
["type"]=>
string(9) "namespace"
["name"]=>
string(7) "Example"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(3)
}
[1]=>
array(5) {
["type"]=>
string(3) "use"
["aliases"]=>
array(2) {
[0]=>
array(5) {
["name"]=>
string(3) "Foo"
["alias"]=>
string(3) "Baz"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(15)
}
[1]=>
array(5) {
["name"]=>
string(3) "Bar"
["alias"]=>
string(3) "Buz"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(27)
}
}
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(27)
}
}
Did this file decode correctly?
Original Code
--TEST--
Using imports, comma and aliases
--SKIPIF--
<?php include(__DIR__ . '/../skipif.inc'); ?>
--FILE--
<?php
$code =<<<ZEP
namespace Example;
use Foo as Baz, Bar as Buz;
ZEP;
var_dump(zephir_parse_file($code, '(eval code)'));
?>
--EXPECT--
array(2) {
[0]=>
array(5) {
["type"]=>
string(9) "namespace"
["name"]=>
string(7) "Example"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(3)
}
[1]=>
array(5) {
["type"]=>
string(3) "use"
["aliases"]=>
array(2) {
[0]=>
array(5) {
["name"]=>
string(3) "Foo"
["alias"]=>
string(3) "Baz"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(15)
}
[1]=>
array(5) {
["name"]=>
string(3) "Bar"
["alias"]=>
string(3) "Buz"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(27)
}
}
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(27)
}
}
Function Calls
None |
Stats
MD5 | 53e8c341c706cbaa6dd021840b6c7e7b |
Eval Count | 0 |
Decode Time | 92 ms |