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 8225355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:23:20+00:00 2026-06-07T15:23:20+00:00

on my server (Centos5) i have PHP 5.2, i’m unable to update it, i

  • 0

on my server (Centos5) i have PHP 5.2, i’m unable to update it, i read somewhere that PHP 5.4 won’t work on Centos5, didn’t inspect enough as i am in the middle of a lot of projects, anyways, here is the syntax :

$data['trees'] = (new Tree())->where('parent_id',0)->get(); 

On my WAMP it runs on PHP 5.4.3, on the server it gives me the following error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR

  • 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-07T15:23:22+00:00Added an answer on June 7, 2026 at 3:23 pm

    Support for accessing instance members directly after a new expression was introduced in PHP 5.4 (finally). Note that the parentheses are required around the new expression, as in your given line of code, or it won’t work.

    I haven’t heard of any particular server configurations or platforms where this won’t work when running PHP 5.4. If it causes an error on a server where PHP 5.4 is installed, it’s likely that’s not the version that’s interpreting your script (check your server config, .htaccess, and INI directives).

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

Sidebar

Related Questions

I have a PHP script that I don't want anyone to be able to
I'm trying to install redmine on a Centos server. I already have PHP and
I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3 I
I have a CentOS 6 server set up with git, gitosis, nginx, and php-fpm.
I have an iphone application that gets data from a set of php files.
I want to create website thumbnails (screenshots) using php. I have a dedicated server
I've read about APC that it speeds up multiple php file sites. So I
I have a Lighttpd(1.4.28) web server running on Centos 5.3 and PHP 5.3.6 in
I have an PHP website on a RHEL5/CentOS dedicated server. The website is located
I have a centos server and would like to install selenium, primarily for taking

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.