To force script all the way down above
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_action( 'wp_footer', 'function_to_add', PHP_INT_MAX );
function function_to_add() {
echo "string";
}
<!-- PHP_INT_MAX (integer) The largest integer supported in this build of PHP. Usually int(2147483647). Available since PHP 5.0.5 -->