# argv and plus signs

- Thread: https://externals.io/message/2174
- Original archive: https://news-web.php.net/php.internals/2174
- Started by Monte Ohrt on 2003-06-04T20:09:20+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2174 — Monte Ohrt — 2003-06-04T20:09:20+00:00

URL: https://externals.io/message/2174#2174

Hi,

I asked Andrei about this and he suggested that I pose this question to
you folks...

I'm trying to use php from the command line and the $argv array seems to
be squashing plus signs (+) in the content.

Example:

$> test.php -R '\w+\.gif' file.txt

A printout of $argv reveals:

Array(
  [0] => test.php
  [1] => -R
  [2] => \w
  [3] => \.gif
  ]4] => file.txt
)

I tried different escapement and quotes thinking that it was the shell
causing the problems, but nothing seems to help. Maybe the args are
expected to be URL encoded? I tried some values like %23, but those went
unchanged, only space is affected.

Is this a bug, or am I missing something? How do I pass a plus sign?

TIA
Monte
