include and require call fails when Double quote is used in php 5.4 easy php dev server

173 views Asked by At

I am getting a strange problem with "include" and "require" call in php 5.4. I am running Easy PHP Dev server VC 9 on windows 7 machine.

include("D:\EasyPHP-14.1VC9\data\localweb\rightcontact\protected\controllers\SiteController.php");

//fails

include('D:\EasyPHP-14.1VC9\data\localweb\rightcontact\protected\controllers\SiteController.php');

//working

include("D:/EasyPHP-14.1VC9/data/localweb/rightcontact/protected/controllers/SiteController.php");

//works

include('D:/EasyPHP-14.1VC9/data/localweb/rightcontact/protected/controllers/SiteController.php');

//works

What might be the reason? Is there anything I need to change in php.ini file? Same thing works in php 5.3 in Easy php dev server 5.3.8 version.

1

There are 1 answers

3
andy On BEST ANSWER

Double quoted strings allow the notation of special characters with backslash sequences. For example a newline is written as "\n". Single quoted strings do not interpret these characters.

See the documentation for details.

The reason why your example works is probably that \e is the only valid sequence which is only supported starting with PHP 5.4:

\e escape (ESC or 0x1B (27) in ASCII) (since PHP 5.4.0)