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
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: vinicius at empresa-digital dot com dot br
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 11:01:29 2025 UTC