Req #62663 [Wfx]: Backtick operators are an ugly language construct

From: Date: Thu, 26 Jul 2012 02:08:18 +0000
Subject: Req #62663 [Wfx]: Backtick operators are an ugly language construct
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-172243@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62663&edit=1

 ID:                 62663
 User updated by:    eldmannen+php at gmail dot com
 Reported by:        eldmannen+php at gmail dot com
 Summary:            Backtick operators are an ugly language construct
 Status:             Wont fix
 Type:               Feature/Change Request
 Package:            Scripting Engine problem
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I think it should throw a E_DEPRECATED warning suggesting the use of shell_exec().


Previous Comments:
------------------------------------------------------------------------
[2012-07-26 01:49:32] aharvey@php.net

Given how long backticks have been part of the language, there's no chance they'll be
removed, given backward compatibility concerns. Sorry.

------------------------------------------------------------------------
[2012-07-26 00:36:43] eldmannen+php at gmail dot com

Description:
------------
The backtick operator construct is an ugly construct.

The shell_exec() function should be used instead.

I propose the removal of the backtick operator construct.

Test script:
---------------
<?php

uname -a;
echo cat /dev/zero /dev/sdx; // how sneaky

// I use backtick instead of single quotes to sneak by code auditors

?>



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62663&edit=1


Thread (3 messages)

« previous php.bugs (#172243) next »