Loading CHANGELOG.md +7 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,13 @@ ## 4.x ### 4.1.0 *Jul 14, 2023* * Removed implicit conversion of floats to strings. Since it was unreliable, it's not considered a BC break. ### 4.0.0 *Dec 14, 2022* Loading docs/decoding.rst +1 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ Scalars will be converted to their respective types. "d" . "3:arrli1ei2ei3ei4ee" . "4:booli1e" . "5:float6:3.1415" . "3:inti123e" . "6:string9:test\0test" . "e" Loading @@ -27,12 +26,11 @@ Scalars will be converted to their respective types. // [ // "arr" => [1,2,3,4], // "bool" => 1, // "float" => "3.1415", // "int" => 123, // "string" => "test\0test", // ] Please note that floats and booleans will stay converted because Bencode has no native support for these types. Please note that booleans will stay converted because Bencode has no native support for these types. Lists and Dictionaries ====================== Loading docs/encoding.rst +2 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Encoding Scalars and arrays ================== .. versionchanged:: 4.1 floats now throw an exception instead of becoming strings .. code-block:: php <?php Loading @@ -19,8 +21,6 @@ Scalars and arrays 'arr' => [1,2,3,4], // integer is stored as is 'int' => 123, // float will become a string 'float' => 3.1415, // true will be an integer 1 'true' => true, // false and null values will be skipped Loading @@ -30,7 +30,6 @@ Scalars and arrays ]); // "d" . // "3:arr" . "l" . "i1e" . "i2e" . "i3e" . "i4e" . "e" . // "5:float" . "6:3.1415" . // "3:int" . "i123e" . // "6:string" . "9:test\0test" . // "4:true" . "i1e" . Loading Loading
CHANGELOG.md +7 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,13 @@ ## 4.x ### 4.1.0 *Jul 14, 2023* * Removed implicit conversion of floats to strings. Since it was unreliable, it's not considered a BC break. ### 4.0.0 *Dec 14, 2022* Loading
docs/decoding.rst +1 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ Scalars will be converted to their respective types. "d" . "3:arrli1ei2ei3ei4ee" . "4:booli1e" . "5:float6:3.1415" . "3:inti123e" . "6:string9:test\0test" . "e" Loading @@ -27,12 +26,11 @@ Scalars will be converted to their respective types. // [ // "arr" => [1,2,3,4], // "bool" => 1, // "float" => "3.1415", // "int" => 123, // "string" => "test\0test", // ] Please note that floats and booleans will stay converted because Bencode has no native support for these types. Please note that booleans will stay converted because Bencode has no native support for these types. Lists and Dictionaries ====================== Loading
docs/encoding.rst +2 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Encoding Scalars and arrays ================== .. versionchanged:: 4.1 floats now throw an exception instead of becoming strings .. code-block:: php <?php Loading @@ -19,8 +21,6 @@ Scalars and arrays 'arr' => [1,2,3,4], // integer is stored as is 'int' => 123, // float will become a string 'float' => 3.1415, // true will be an integer 1 'true' => true, // false and null values will be skipped Loading @@ -30,7 +30,6 @@ Scalars and arrays ]); // "d" . // "3:arr" . "l" . "i1e" . "i2e" . "i3e" . "i4e" . "e" . // "5:float" . "6:3.1415" . // "3:int" . "i123e" . // "6:string" . "9:test\0test" . // "4:true" . "i1e" . Loading