Sounds like ACOD or COD in ny. But that’s for misdemeanor. He had felony charges.
Illinois allows this for all sorts of felonies. Even weapons offenses and serious drug charges.