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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC