I couldn't find information on this easily, so I thought it's worth putting this here.

The equivalent of drupal_var_export() / ctools_var_export() in Drupal 8/9 is Variable::export():

Tags
Version
Submitted by berliner on Thu, 12/23/2021 - 11:48