Skip to content

Commit d426c37

Browse files
committed
Fix check for PHP 7+
1 parent 2318f91 commit d426c37

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## [Unreleased][unreleased]
88

9+
## [1.0.3] - 2018-01-14
10+
### Fixed
11+
- Fixed check for PHP 7+
12+
913
## [1.0.2] - 2018-01-14
1014
This release contains massive performance improvements of 98% or more, especially for larger JSON inputs!
1115

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

27-
[unreleased]: https://github.com/colinodell/json5/compare/1.0.2...HEAD
31+
[unreleased]: https://github.com/colinodell/json5/compare/1.0.3...HEAD
32+
[1.0.3]: https://github.com/colinodell/json5/compare/1.0.2...1.0.3
2833
[1.0.2]: https://github.com/colinodell/json5/compare/1.0.1...1.0.2
2934
[1.0.1]: https://github.com/colinodell/json5/compare/1.0.0...1.0.1

src/Json5Decoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function decode($source, $associative = false, $depth = 512, $opti
8080
{
8181
// Try parsing with json_decode first, since that's much faster
8282
// We only attempt this on PHP 7+ because 5.x doesn't parse some edge cases correctly
83-
if (PHP_VERSION_ID >= 700000) {
83+
if (PHP_VERSION_ID >= 70000) {
8484
$result = json_decode($source, $associative, $depth, $options);
8585
if (json_last_error() === JSON_ERROR_NONE) {
8686
return $result;

0 commit comments

Comments
 (0)