Skip to content

Commit

Permalink
Fix check for PHP 7+
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Jan 14, 2018
1 parent 2318f91 commit d426c37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [Unreleased][unreleased]

## [1.0.3] - 2018-01-14
### Fixed
- Fixed check for PHP 7+

## [1.0.2] - 2018-01-14
This release contains massive performance improvements of 98% or more, especially for larger JSON inputs!

Expand All @@ -24,6 +28,7 @@ This release contains massive performance improvements of 98% or more, especiall
### Added
- Initial commit

[unreleased]: https://github.com/colinodell/json5/compare/1.0.2...HEAD
[unreleased]: https://github.com/colinodell/json5/compare/1.0.3...HEAD
[1.0.3]: https://github.com/colinodell/json5/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/colinodell/json5/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/colinodell/json5/compare/1.0.0...1.0.1
2 changes: 1 addition & 1 deletion src/Json5Decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function decode($source, $associative = false, $depth = 512, $opti
{
// Try parsing with json_decode first, since that's much faster
// We only attempt this on PHP 7+ because 5.x doesn't parse some edge cases correctly
if (PHP_VERSION_ID >= 700000) {
if (PHP_VERSION_ID >= 70000) {
$result = json_decode($source, $associative, $depth, $options);
if (json_last_error() === JSON_ERROR_NONE) {
return $result;
Expand Down

0 comments on commit d426c37

Please sign in to comment.