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-- Bug #80821: ReflectionProperty::getDefaultValue() returns current value for stati..

Decoded Output download

--TEST--
Bug #80821: ReflectionProperty::getDefaultValue() returns current value for statics
--FILE--
<?php

class Statics {
	public static $staticVar = 1;
}

Statics::$staticVar = 2;

$reflect = new \ReflectionClass(Statics::class);
$prop = $reflect->getProperty("staticVar");
var_dump($prop->getDefaultValue());

?>
--EXPECT--
int(1)

Did this file decode correctly?

Original Code

--TEST--
Bug #80821: ReflectionProperty::getDefaultValue() returns current value for statics
--FILE--
<?php

class Statics {
	public static $staticVar = 1;
}

Statics::$staticVar = 2;

$reflect = new \ReflectionClass(Statics::class);
$prop = $reflect->getProperty("staticVar");
var_dump($prop->getDefaultValue());

?>
--EXPECT--
int(1)

Function Calls

None

Variables

None

Stats

MD5 a167dfc602120f080d118316a3364910
Eval Count 0
Decode Time 101 ms