Printing PHP variable in form element in buildForm function I have a php variable like this

$opensslOut = preg_replace('/\n\r{0,1}/', '&lt;br&gt;', $str);


I need to print its value on a form element. I used the following code

$form['openssl'] = [
      '#title' =&gt; t('OpenSSL'),
      '#markup' =&gt; t('$opensslOut'),
    ];


But didn't worked? I am a newbie in Drupal, Please help me to figure out a solution.
It's just a silly error '#markup' =&gt; t('$opensslOut') needs to be without the '' because $opensslOut is a variable and not a string. 

So use 

'#markup' =&gt; t($opensslOut)