thank you for WebElain to help me. This answer driving me to the right request.
Now it’s ok. It is an object indead and I use something more simple with get_comments () query with parameter count enabled.
the final code is like this :
#!/usr/bin/php
<?php
if ( ! defined('ABSPATH') ) {
/** Set up WordPress environment */
require_once( dirname( __FILE__ ). '/wordpress/wp-load.php' );
}
$output = shell_exec('date --date="10 day ago" "+%Y-%m-%d %T"');
echo "$output";
// WP_Comment_Query arguments
$args1 = array(
'status' => 'approve',
'count' => true,
'date_query' => array(
array (
'after' => $output,
),
),
);
//$comms = var_dump( $comments );
$nbr = get_comments( $args1 );
echo "$nbr\n";
?>
Thank you.