Get 'Warning Use of undefined constant ‘wp_enqueue_scripts'"

Hello. I migrated a WP site (copy) to Local and when I “go” to the site I see at the very top:

Warning: Use of undefined constant ‘wp_enqueue_scripts’ - assumed ‘‘wp_enqueue_scripts’’ (this will throw an Error in a future version of PHP) in in /app/public/wp-content/themes/visual-composer-starter-child/functions.php on line 2 Warning: Use of undefined constant ‘enqueue_parent_styles’ - assumed ‘‘enqueue_parent_styles’’ (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/visual-composer-starter-child/functions.php on line 2

I don’t see this error on the hosted site, so I am asking the Local community first for some insight. I tried the suggestion by member Jack Sellwood to turn on “Trust” for the local site (based on another member’s post about an “undefined constant error”) but doing so didn’t solve the issue. I am not that knowledgeable about PHP - but isn’t “wp_enqueue_scripts” a valid command and not a constant? I welcome any insight or solution. Thanks.

Whats the php version in your production site & local site?

You seem to be using a single apostrophe instead of single quote ' for ‘wp_enqueue_scripts’

Local by Flywheel settings:
PHP: 7.2.9
MySQL: 5.2.2

Host settings (Siteground):
PHP: 5.6.30
MySQL: (not sure - “libmysql” 5.1.73; “phpMyAdmin”: 4.7.3 )

So, it seems that PHP between Local and Siteground are different - but I would think v 7.2.9 would be backwards compatible with what is running correctly on Siteground (older PHP version). That’s an assumption. Advice?
The apostrophe/ single quote at the start of the message is from my typing of the message. The block quote is a copy/paste.
Thanks

Hello delonnkoh. You gave me the idea to change the PHP version on Local to 5.6, to better match the host site. Doing so has apparently removed the warning message. The site (for the most part) on Local seems to be working OK.

Thanks for the lead!

Hi @Alexandros787,

Glad it works out. Yes the warning throw is most probably from the updated PHP version.

Even thou you have downgrade the local site php version to 5.6, I would still suggest you to take a look at the offending block of code (wp_enqueue_scripts & enqueue_parent_styles) to check if you accidentally use a fancy apostrophe(normally due to copy and paste) instead of single quote.