Code snippet to show current php version inside “At a Glance” box in admin

This one will add php version at the bottom of ‘at a glance’ metabox, where goes wordpress version with active theme name.

function update_right_now_text_callback($content){
    $php_version = __('PHP version: ') . phpversion();
    return $php_version . ' | ' . $content;
}

add_filter( 'update_right_now_text', 'update_right_now_text_callback' );

If you want to add it as content list item for some reason, this snippet work:

function dashboard_glance_items_callback( $data = [] ) {
    $data[]      = 'PHP version: ' . phpversion();
    return $data;
}

add_filter( 'dashboard_glance_items', 'dashboard_glance_items_callback' );