Re: A curious thing...about tags. [message #182247 is a reply to message #182224] |
Wed, 24 July 2013 20:58 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Norman Peelman wrote:
> On 07/22/2013 05:15 AM, Alex vdB wrote:
>> and the following produces "?> something <?", once the EOF is received:
>> php -a
>> <?php
>> $saysomething="something";
>> $run="?> $saysomething <?";
>> echo $run;
>>
>>
>> Maybe try "php -n -a" and don't forget EOF as well as the php opening
>> tag.
>
> norman@amd64x2:~$ php -a
> Interactive shell
>
> php > <?php
> php > $something = "something";
>
> Parse error: syntax error, unexpected '<' in php shell code on line 1
>
> That doesn't fly here... You seem to be in Interactive Mode not
> Interactive Shell, there is a difference.
>
> http://php.net/manual/en/features.commandline.interactive.php
“php -a” does different things depending on the PHP build options. As it
says there, PHP must be built with readline support for the interactive PHP
shell to be available; otherwise “-a” will read until it receives an EOF
character (Ctrl+*D* on *Unices*, Ctrl+*Z* on *Windows*), and then execute
the program.
Where the built-in PHP shell is not available, like on Debian GNU/Linux,
there is phpsh. However, phpsh's coloring is buggy, so
alias phpsh='phpsh -c'
in e.g. ~/.bashrc, to disable that, is recommended.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
|
|
|