|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11874 <script> way of inline'ing PHP has quite strict syntax
Submitted: 2001-07-04 07:31 UTC Modified: 2005-09-02 14:05 UTC
From: vinicius at empresa-digital dot com dot br Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
 [2001-07-04 07:31 UTC] vinicius at empresa-digital dot com dot br
The attribute 'content' inside '<script' tag is not being properly recognized in version 4.0.5.

If I insert it, the preprocessor returns an error condition. If I strip it, everything works fine.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-04 13:26 UTC]
I don't get what you are meaning here. Can you add an example of a whole line of both cases (one with the error, and one that works)?

 [2001-07-04 19:25 UTC]
The script way of inline-ing php only works with

<script language="php">, and nothing else (no other attributes).

This is a speed issue: Zend doesn't implement a whole html-parser just to support this... in only accepts whiteshace difference and case-diffs.

There is no use for this too, since it will *not* be send to the browser. (RTFM on 'What it PHP': a preprocessor)

Documentation should be more clear on this, so changed to an open documention bug.

For the documenter: may add example that the context is not important? (i.e. <font size="<script php>echo '+1'</script>"> works)
 [2005-09-02 14:05 UTC]
Documentantion is clear enough about it.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 22 14:01:23 2021 UTC