diff --git a/src/Peachpie.Runtime/PhpValue.cs b/src/Peachpie.Runtime/PhpValue.cs index d4d8ca04b1..df5c038bc8 100644 --- a/src/Peachpie.Runtime/PhpValue.cs +++ b/src/Peachpie.Runtime/PhpValue.cs @@ -420,6 +420,8 @@ public Convert.NumberInfo ToNumber(out PhpNumber number) public static explicit operator double(PhpValue value) => value.ToDouble(); + public static explicit operator decimal(PhpValue value) => value.ToDecimal(); + public static explicit operator PhpNumber(PhpValue value) { if ((value.ToNumber(out var result) & Convert.NumberInfo.Unconvertible) != 0)