#!/usr/bin/env php 'true', 'reason' => 'ok', 'fp_url' => 'https://fp/a']; $api = RiskSecondaryCache::toApiResponse($cached); $normalized = cloak_normalize_log_reason($api['result'] ? 'true' : 'false', $api['reason']); $tests['cache_hit_true_reason_empty'] = $normalized === ''; $ok = !in_array(false, $tests, true); echo json_encode(['ok' => $ok, 'tests' => $tests], JSON_UNESCAPED_UNICODE) . "\n"; exit($ok ? 0 : 1);