title: Laravel: PHP Parse error: syntax error, unexpected '?' in /vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500
body: <p>Since i upgraded my php version from 5.6 to 7.2, i have a persistant error on my php_errors.log:
  <code>PHP Parse error:  syntax error, unexpected '?' in /vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500</code></p>
  
  <p>On Line 500:</p>
  
  <p><code>return $factory-&gt;of($arguments[0], $arguments[1])-&gt;times($arguments[2] ?? null);</code></p>
  
  <p>I Search for this on stackoverflow, and the main cause is server still using php5.6, but i think it's not the reason. Platform is Laravel 5.7 and apparently is all working fine.</p>
  
  <p>If i run <code>php -v</code> from the terminal i got PHP 7.2:</p>
  
  <p><code>PHP 7.2.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 12 2018 09:55:12)(NTS)
  Copyright (c) 1997-2018 The PHP Group
  Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies</code></p>
  
  <p>Some questions on stackoverflow suggest adding a phpinfo to show the php version used by the system, and actually is the correct:</p>
  
  <p><a href="https://i.stack.imgur.com/jwcCV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jwcCV.png" alt="php info from my platform"></a></p>
  
  <p>Even if i tried to disable old version, server says that php5.6 is already disabled: </p>
  
  <p><code>Module php5.6 already disabled</code></p>
  
  <p>With php5.6 disabled and php 7.2 up and running, what could be causing this ?</p>
  
  <p>Thanks in advance.</p>