I am running a very simple PHP script from the command line/server and dynamically creating a variable by concatenating other variables, and then simply printing it out.
my php version on the server is PHP Version => 5.6.20-1+deb.sury.org~trusty+1
Heres my code:
$var1 = 'Website-Name';
$var2 = '^8.2.0';
$var3 = 'dev';
$var4 = "composer create-project acquia/lightning-project:" . $var2. " " . $var1. " --no-interaction --stability " . $var3;
echo $var4;
when outputted the $var4
variable is equal to: --no-interaction --stability
It doesn't seem to treat the .
as concatenation and completely ignores everything else including the other string portion.
when I output
echo composer create-project acquia/lightning-project:^8.2.0 Website-Name --no-interaction --stability dev;
The correct value is shown. I'm very confused because this is very very basic PHP stuff i've always been good at. this is problematic because this simple task is currently a road block for the functionality of the script, where I should be spending my time.
Anyone have any ideas on what's going on?