public parseLiteral ( $ast ) : float | null | ||
$ast | ||
Результат | float | null |
public function parseLiteral($ast)
{
if ($ast instanceof FloatValueNode || $ast instanceof IntValueNode) {
return (double) $ast->value;
}
return null;
}