Skip to main content
STDOUT version
Source Link
aross
  • 1.7k
  • 10
  • 12

PHP, 1 byte

_

This leads to a parse error. Run like this:

php -r '_'
> PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1

Version without resorting to STDERR (8 bytes)

Note: uses IBM-850 encoding

<?=~»À»;

Run like this:

echo '<?=~»À»;' | php 2>/dev/null
> PHP

This just uses the binary opposite of PHP, and negates it using the ~ operator.

PHP, 1 byte

_

This leads to a parse error. Run like this:

php -r '_'
> PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1

PHP, 1 byte

_

This leads to a parse error. Run like this:

php -r '_'
> PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1

Version without resorting to STDERR (8 bytes)

Note: uses IBM-850 encoding

<?=~»À»;

Run like this:

echo '<?=~»À»;' | php 2>/dev/null
> PHP

This just uses the binary opposite of PHP, and negates it using the ~ operator.

Source Link
aross
  • 1.7k
  • 10
  • 12

PHP, 1 byte

_

This leads to a parse error. Run like this:

php -r '_'
> PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1