EvaluateExpression($oExpr->var); if (is_null($oVar)) { return null; } if ($oExpr->name instanceof Identifier){ $sName = $oExpr->name->name; } else { $sName = PhpExpressionEvaluator::GetInstance()->EvaluateExpression($oExpr->name); } $oReflectionClass = new ReflectionClass(get_class($oVar)); try{ $oProperty = $oReflectionClass->getProperty($sName); if ($oProperty->isPublic()){ return $oProperty->getValue($oVar); } } catch (\ReflectionException $t) {} return null; } }