summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2015-06-25 13:00:35 +0800
committerXuefer <xuefer@gmail.com>2015-07-03 13:26:11 +0800
commit86be121923e0f737729f2aaf4c38c1d424cce9b6 (patch)
tree03ac5a1d6c7c03d0d5929a36f61002bc6d366077 /devel
parent0ea8e3c247b980e26afe6b511956b05c482e5d70 (diff)
downloadxcache-86be121923e0f737729f2aaf4c38c1d424cce9b6.tar.gz
xcache-86be121923e0f737729f2aaf4c38c1d424cce9b6.zip
Decompiler: (PHP_5_3+) support for const, fix __DIR__ __FILE__ __CLASS__ for class const
Diffstat (limited to 'devel')
-rw-r--r--devel/sample.cpp.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/devel/sample.cpp.php b/devel/sample.cpp.php
index 50ad9e2..2af2a36 100644
--- a/devel/sample.cpp.php
+++ b/devel/sample.cpp.php
@@ -22,11 +22,12 @@ namespace ns;
abstract class ClassName
{
#if PHP_VERSION >= 500
- const CONST_VALUE = 'A constant value';
- const file = __FILE__;
+ const File = __FILE__;
+ const ClassName = __CLASS__;
#if PHP_VERSION >= 530
- const dir = __DIR__;
+ const Dir = __DIR__;
#endif
+ const CONST_VALUE = 'A constant value';
/** doc */
static public $static = array(
@@ -455,6 +456,11 @@ final class Child extends ClassName implements IInterface
#endif
define('CONST_VALUE', 'const value');
+#if PHP_VERSION > 530
+const CONST_VALUE1 = __FILE__;
+const CONST_VALUE2 = __DIR__;
+const CONST_VALUE3 = 'a';
+#endif
$late = isset($_ENV['LATE']);
if ($late) {