Jump to content

Script/Program to convert '<?' into '<?php'


guarriman

Recommended Posts

Hi.

 

I want to migrate from PHP4 (where I use '<?') to PHP5 (where I must use '<?php').

 

Do you know a program or a Linux script to do it? Thank you very much.

 

Why not just use a text editor like NotePad phpDesigner or any other and use Find & Replace?

 

Find: <?

 

Replace with: <?php

Link to comment
Share on other sites

Hi.

 

I want to migrate from PHP4 (where I use '<?') to PHP5 (where I must use '<?php').

 

Do you know a program or a Linux script to do it? Thank you very much.

PHP5 does support the short tags (<? and <?php=) all you need to do is enable a setting called short_open_tag. However if your script is small then I'd recommend you to convert the short tags to their respective full version.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.