php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 4 = ?
Subscribe to this entry?

 
 [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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-04 13:26 UTC] derick@php.net
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)?

Derick
 [2001-07-04 19:25 UTC] jeroen@php.net
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] vrana@php.net
Documentantion is clear enough about it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC