-1

I made a small framework for my site using php 5.6. Unfortunately, I noticed just before uploading to the Hosting plateform that its web server has php 5.1.3. The minimum version for my website must be php 5.3 because of the use of namespaces (and composer).

Can I make php 5.1 ignore the namespaces or do I have to rewrite the scripts?

1 Answers1

0

You can't make versions < 5.3 of PHP ignore namespaces.

To help you migrate (or automate the migration) your code, check that : PHP namespace removal / mapping and rewriting identifiers

Community
  • 1
  • 1
alfallouji
  • 1,160
  • 8
  • 12
  • Thanks for the link. I'm sorry it seems like a duplicate but i didn't find the question you pointed me to. – Simon Cateau Feb 28 '15 at 15:45
  • There's a composer package witch creates an autoloader for php versions before 5.3. You can get it at: https://bitbucket.org/xrstf/composer-php52. – Simon Cateau Mar 01 '15 at 09:53
  • The link is dead. Now that the provider finally switched to php 5.6, I don’t need this anymore and that’s great. – Simon Cateau Nov 07 '22 at 09:56