# Unexpected character in input

- Thread: https://externals.io/message/24102
- Original archive: https://news-web.php.net/php.internals/24102
- Started by Sebastian Bergmann on 2006-06-13T05:15:56+00:00
- Messages: 3
- 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

---

## #24102 — Sebastian Bergmann — 2006-06-13T05:15:56+00:00

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

I am baffled by this warning:

   Warning: Unexpected character in input:  '' (ASCII=27) state=1 in
   /usr/local/src/PHPUnit2/Util/Report/Coverage/Node/File.php on line 182

 The line reported is

   $tokens = token_get_all('<?php ' . $line . ' ?>');

 Any idea what is going wrong here? This is current PHP_5_2.

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #24103 — Jasper Bryant-Greene — 2006-06-13T05:20:53+00:00

URL: https://externals.io/message/24102#24103 · In reply to: #24102

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Try opening the suspect file in a hex editor, or some editor which won't
hide special characters (e.g. ASCII 27) from you. I think you'll find
that one has somehow wound its way in there. Either that, or current
PHP_5_2 is messed up in some way =)

Jasper

Sebastian Bergmann wrote:
>  I am baffled by this warning:
> 
>    Warning: Unexpected character in input:  '' (ASCII=27) state=1 in
>    /usr/local/src/PHPUnit2/Util/Report/Coverage/Node/File.php on line 182
> 
>  The line reported is
> 
>    $tokens = token_get_all('<?php ' . $line . ' ?>');
> 
>  Any idea what is going wrong here? This is current PHP_5_2.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEjks1FfAeHhDzT4gRA5gYAKCo+YdZXu0/cBOH8eoNZxbNcw1t9QCdF6b/
ae/7FJB5/nQOY8O4/7+KTUI=
=NG+u
-----END PGP SIGNATURE

---

## #24108 — Sebastian Bergmann — 2006-06-13T08:46:27+00:00

URL: https://externals.io/message/24102#24108 · In reply to: #24102

Sebastian Bergmann wrote:
> Any idea what is going wrong here?

 Sorry for the noise, it turned out that is caused by escape sequences in
 the code that my code analyzes using `token_get_all()`.

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
