Skip to content

Commit 52f529f

Browse files
dkeetonxDaniel Keeton
andauthored
Convert numeric strings to float values (#3)
Co-authored-by: Daniel Keeton <dkeeton@cogentco.com>
1 parent 3702672 commit 52f529f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Core/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function lookupVariable(string $name): RuntimeValue
158158
public static function convertToRuntimeValues(mixed $input): RuntimeValue
159159
{
160160
if (is_numeric($input)) {
161-
return new NumericValue($input);
161+
return new NumericValue(floatval($input));
162162
}
163163

164164
if (is_string($input)) {

0 commit comments

Comments
 (0)