php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62663 Backtick operators are an ugly language construct
Submitted: 2012-07-26 00:36 UTC Modified: 2012-07-26 02:08 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: eldmannen+php at gmail dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: eldmannen+php at gmail dot com
New email:
PHP Version: OS:

 

 [2012-07-26 00:36 UTC] 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

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-26 01:49 UTC] 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 01:49 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2012-07-26 02:08 UTC] eldmannen+php at gmail dot com
I think it should throw a E_DEPRECATED warning suggesting the use of shell_exec().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC