How to limit the number of posts revisions in WordPress

wp-config.php

define( 'WP_POST_REVISIONS', 3 );