Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:35:22+00:00 2026-06-18T00:35:22+00:00

I have: on my pc:wamp server (apache+php-5.4.3+mysql) on my vps:nginx+php5-fpm+mysql(all latest in the ubuntu

  • 0

I have:
on my pc:wamp server (apache+php-5.4.3+mysql)
on my vps:nginx+php5-fpm+mysql(all latest in the ubuntu 64 bit server repository).

recently I have reinstalled the whole vps

my problem is,

statement like this:

function foo($arr){

return $arr;

}


foo(['foo1','foo2','foo3'])

works on my pc, and used to work on the server (same installation) but now it gives
an error such as:

Parse error: syntax error, unexpected '[' in /home/Websites/Domains/squazza/php/db.php 
on line 261 

(replacing the [ ] with Array( ) does fix the problem)

now I assume that this problem is related to php.ini so i am asking what setting could possibly be affecting this kind of behavior and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:35:23+00:00Added an answer on June 18, 2026 at 12:35 am

    If you look at the documentation that short syntax is only avaible in php 5.4+ I suspect your php versions are different.

    This list of new features in PHP5.4 maybe of some use to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WAMP (windows (7), apache, mysql, php) stack all setup and running.
i Installed wamp server with Apache 2.0.63 and Php 5.2.9 and mysql 5.1.33 versions.
I have WAMP server installed in my PC. Apache Version : 2.2.17 PHP Version
I have WAMP SERVER,PHP 5.3.0 and Apache server 2.2.11 I want to download a
I have the following environment. OS: Win 7 64 Bit WAMP Server 2.2 PHP:
On Windows using WAMPserver (Apache, MySQL, PHP) I have the following: //test.php if (!defined('LC_MESSAGES'))
I have a backup from a WAMP server MYSQL database from home and I
I have a WAMP 2.0 server installed on Win XP . Apache version :
Im using Windows 7, and there I installed apache server in c:\wamp\apache\ , PHP
Iam running WAMP server and just enabled php_memcache extension and have tried the code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.