php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37883 incorrect handling of double quotes in argv parameters
Submitted: 2006-06-22 11:00 UTC Modified: 2006-06-22 19:01 UTC
From: winfried dot pohl at pohl-it dot de Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5CVS-2006-06-22 (snap) OS: Windows 2000/2003
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: winfried dot pohl at pohl-it dot de
New email:
PHP Version: OS:

 

 [2006-06-22 11:00 UTC] winfried dot pohl at pohl-it dot de
Description:
------------
php incorrectly handles doubled doublequotes in commandline parameters which are either ignored or result in messed up argv-array

Reproduce code:
---------------
## test.php
<?
print_r($argv);
?>

## commandline 1
php test.php """param1_1""param1_2" "param2" "param3"

## commandline 2
php test.php """param1_1""param1_2" "param2" ""


Expected result:
----------------
Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => param3
)

Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => 
)

Actual result:
--------------
Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 param3
)

Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 "
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-22 19:01 UTC] tony2001@php.net
Not PHP problem.
Please report it to Microsoft.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 08:01:32 2025 UTC