mirror of
https://github.com/LamGC/wp-asciiplayer.git
synced 2026-11-26 20:55:48 +00:00
Match upstream millisecond accumulation and bound native timer horizons. Add deterministic rounding, overflow and non-progress regression casts, with captured-player and WordPress playback/upload coverage.
12 lines
460 B
PHP
12 lines
460 B
PHP
<?php
|
|
/** Test-only decoder instrumentation, loaded before production calls. */
|
|
|
|
namespace LamGC\Asciiplayer {
|
|
// Instrument the real decoder without adding a production test hook. A gate
|
|
// failure must not build the rejected whole-document object graph.
|
|
function json_decode( $json, $associative = null, $depth = 512, $flags = 0 ) {
|
|
$GLOBALS['cast_decode_lengths'][] = strlen( $json );
|
|
return \json_decode( $json, $associative, $depth, $flags );
|
|
}
|
|
}
|