getDataCapacity($errorLevel); $rsCapacity = ReedSolomonEncoder::getDataCapacity($version, $errorLevel->value); echo " {$errorLevel->value}: QrCodeVersion={$qrCapacity} bits (" . ($qrCapacity / 8) . " bytes), "; echo "ReedSolomon={$rsCapacity} codewords\n"; // Check if they match when converted if (($qrCapacity / 8) != $rsCapacity) { echo " ❌ MISMATCH: " . ($qrCapacity / 8) . " bytes vs $rsCapacity codewords\n"; } else { echo " ✅ MATCH\n"; } } echo "\n"; }