title: myclabs/deep-copy unexpected function
body: <p>I couldn't find a clear solution online, so I am including the problem and solution here for anybody who may have a similar problem. </p>
  
  <pre><code>unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\\\ (T_NS_SEPARATOR) in /var/www/html/basic/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php 
  </code></pre>
  
  <p>deep-copy was causing the error above. It transpires this is because deep-copy >1.8.1 is incompatible with PHP v7.3 (which is what I am using). </p>
  
  <p>I updated the composer.json file (forcing a downgrade of deep-copy) as follows and then ran composer update:</p>
  
  <pre><code>"require": {
  "myclabs/deep-copy": "=1.8.0",
  </code></pre>
  
  <p>This solved the problem.</p>
  
  <p>I hope somebody finds this useful. </p>