Skip to content

Commit a2728c3

Browse files
committed
Add NumericValue string filter support
1 parent 8f2bf4e commit a2728c3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Core/Interpreter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ private function applyFilter(RuntimeValue $operand, Identifier|CallExpression $f
375375
"abs" => $operand instanceof IntegerValue ? new IntegerValue(abs($operand->value)) : new FloatValue(abs($operand->value)),
376376
"int" => new IntegerValue((int)floor($operand->value)),
377377
"float" => new FloatValue((float)$operand->value),
378+
"string" => new StringValue((string)$operand->value),
378379
default => throw new \Exception("Unknown NumericValue filter: {$filter->value}"),
379380
};
380381
}

0 commit comments

Comments
 (0)