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-- Syntax error when use unicode --SKIPIF-- <?php include(__DIR__ . '/../skipif.inc'..

Decoded Output download

--TEST--
Syntax error when use unicode
--SKIPIF--
<?php include(__DIR__ . '/../skipif.inc'); ?>
<?php include(__DIR__ . '/../skipifwin32.inc'); ?>
--FILE--
<?php

$code =<<<ZEP
namespace Example;

class Test
{
    publicstatic function test()
    {
    }
}
ZEP;

var_dump(zephir_parse_file($code, '(eval code)'));
?>
--EXPECTF--
array(5) {
  ["type"]=>
  string(5) "error"
  ["message"]=>
  string(55) "Scanner error: -2 %sstatic function test()
    {
    }
}"
  ["file"]=>
  string(11) "(eval code)"
  ["line"]=>
  int(5)
  ["char"]=>
  int(10)
}

Did this file decode correctly?

Original Code

--TEST--
Syntax error when use unicode
--SKIPIF--
<?php include(__DIR__ . '/../skipif.inc'); ?>
<?php include(__DIR__ . '/../skipifwin32.inc'); ?>
--FILE--
<?php

$code =<<<ZEP
namespace Example;

class Test
{
    publicstatic function test()
    {
    }
}
ZEP;

var_dump(zephir_parse_file($code, '(eval code)'));
?>
--EXPECTF--
array(5) {
  ["type"]=>
  string(5) "error"
  ["message"]=>
  string(55) "Scanner error: -2 %sstatic function test()
    {
    }
}"
  ["file"]=>
  string(11) "(eval code)"
  ["line"]=>
  int(5)
  ["char"]=>
  int(10)
}

Function Calls

None

Variables

None

Stats

MD5 88c7adeaf851b8b6e307fa9a2b527553
Eval Count 0
Decode Time 81 ms