# Laminas getstart error - multiple php version environment

**URL:** <https://discourse.laminas.dev/t/laminas-getstart-error-multiple-php-version-environment/1770>\
**Category:** API Tools\
**Created:** [August 3, 2020, 4:44am UTC](https://discourse.laminas.dev/t/laminas-getstart-error-multiple-php-version-environment/1770 "2020-08-03T04:44:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocklee44](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rocklee44](https://discourse.laminas.dev/u/rocklee44)\
**Post date:** [August 3, 2020, 4:44am UTC](https://discourse.laminas.dev/t/laminas-getstart-error-multiple-php-version-environment/1770/1 "2020-08-03T04:44:55Z")

</div>

Hi all,  
On my centos 7 server 1, only install php71 , Composer version 1.6.5

php -v  
PHP 7.1.27 (cli) (built: Mar 6 2019 08:53:29) ( NTS )  
Copyright (c) 1997-2018 The PHP Group  
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

I can run sucesfully  
php /usr/local/bin/composer create-project laminas-api-tools/api-tools-skeleton

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.  
Package zfcampus/zf-console is abandoned, you should avoid using it. No replacement was suggested.  
Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.  
Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.  
Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.  
Package zfcampus/zf-deploy is abandoned, you should avoid using it. No replacement was suggested.  
Writing lock file  
Generating autoload files

> laminas-development-mode enable  
> You are now in development mode.

On my server 2 , multiple php version installed : 5.4 (default) , 7.0 , 7.1 , 7.2 , Composer version 1.10.9 (build by php7.1)

/opt/rh/rh-php71/root/bin/php -v  
PHP 7.1.30 (cli) (built: Nov 4 2019 10:07:47) ( NTS )  
Copyright (c) 1997-2018 The PHP Group  
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies  
with Zend OPcache v7.1.30, Copyright (c) 1999-2018, by Zend Technologies

The command fail  
/opt/rh/rh-php71/root/bin/php /usr/local/bin/composer create-project laminas-api-tools/api-tools-skeleton

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.  
Package zfcampus/zf-console is abandoned, you should avoid using it. No replacement was suggested.  
Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.  
Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.  
Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.  
Package zfcampus/zf-deploy is abandoned, you should avoid using it. No replacement was suggested.  
Writing lock file  
Generating autoload files  
19 packages you are using are looking for funding.  
Use the `composer fund` command to find out more!  
Do you want to remove the existing VCS (.git, .svn…) history? [Y,n]? n

> laminas-development-mode enable  
> PHP Parse error: syntax error, unexpected ‘function’ (T\_FUNCTION), expecting identifier (T\_STRING) or \ (T\_NS\_SEPARATOR) in /root/api-tools-skeleton/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php on line 15  
> Script laminas-development-mode enable handling the development-enable event returned with error code 255  
> Script @development-enable was called via post-create-project-cmd

How can I fix it ?

---

<div class="post-metadata">

**Author:** ![maba77](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@maba77](https://discourse.laminas.dev/u/maba77)\
**Post date:** [August 7, 2020, 12:50pm UTC](https://discourse.laminas.dev/t/laminas-getstart-error-multiple-php-version-environment/1770/2 "2020-08-07T12:50:51Z")

</div>

The development mode is enabled after the new project is created. I guess the default PHP installation (version 5.4) is used in this case. “use function” is available since 5.6, so this won’t work.

You should be able to en-/disable the development mode by choosing any of your PHP 7 installations manually: /opt/rh/rh-php71/root/bin/php /usr/local/bin/composer run-script development-enable

If you need to run multiple applications with different PHP requirements, you should have a look at Docker 😉

Regards,  
Marco
