Wrapped json_encode call in PHP version check