title: Overriding property with dynamic property variable not working PHP 7.0
body: <p>When switching from PHP 5.6 to 7.0, I need to do it based on this script. I am trying to apply rewrite rules in WordPress as follows but a strange PHP issue is encountered. Dynamic properties made via variable are not working in PHP 7.0.</p>
  <pre><code>$rule = [   'name' =&gt; 'profile',
              'rule' =&gt; 'author_base',
              'rewrite' =&gt; 'profile',
              'position' =&gt; 'top',
              'replace' =&gt; true,
              'dynamic' =&gt; true
           ];
  global $wp_rewrite;
  global $wp;
  $wp-&gt;add_query_var($rule['name']);
  if(isset($rule['replace']) &amp;&amp; $rule['replace']) {
      var_dump($rule['rule']); // author_base
      $wp_rewrite-&gt;$rule['rule']=$rule['rewrite']; // this doesn't work
      $wp_rewrite-&gt;author_base=$rule['profile']; // this works
      var_dump($wp_rewrite-&gt;$rule['rule']) // return null =&gt; BAD
      var_dump($wp_rewrite-&gt;author_base); // returns 'author' =&gt; OK
      // In PHP 5.6 Works both including $wp_rewrite-&gt;$rule['rule']
  } else {
      add_rewrite_rule($rule['rule'], $rule['rewrite'], $rule['position']);
  }       
  </code></pre>