3 <title>CodeMirror: PHP mode
</title>
4 <meta charset=
"utf-8"/>
5 <link rel=stylesheet
href=
"../../doc/docs.css">
7 <link rel=
"stylesheet" href=
"../../lib/codemirror.css">
8 <script src=
"../../lib/codemirror.js"></script>
9 <script src=
"../../addon/edit/matchbrackets.js"></script>
10 <script src=
"../htmlmixed/htmlmixed.js"></script>
11 <script src=
"../xml/xml.js"></script>
12 <script src=
"../javascript/javascript.js"></script>
13 <script src=
"../css/css.js"></script>
14 <script src=
"../clike/clike.js"></script>
15 <script src=
"php.js"></script>
16 <style type=
"text/css">.CodeMirror {border-top:
1px solid black; border-bottom:
1px solid black;}
</style>
18 <a href=
"http://codemirror.net"><img id=logo
src=
"../../doc/logo.png"></a>
21 <li><a href=
"../../index.html">Home
</a>
22 <li><a href=
"../../doc/manual.html">Manual
</a>
23 <li><a href=
"https://github.com/marijnh/codemirror">Code
</a>
26 <li><a href=
"../index.html">Language modes
</a>
27 <li><a class=active
href=
"#">PHP
</a>
33 <form><textarea id=
"code" name=
"code">
35 function hello($who) {
36 return
"Hello " . $who;
39 <p>The program says <?= hello(
"World")
?>.
</p>
41 alert(
"And here is some JS code"); // also colored
46 var editor = CodeMirror.fromTextArea(document.getElementById(
"code"), {
49 mode:
"application/x-httpd-php",
55 <p>Simple HTML/PHP mode based on
56 the
<a href=
"../clike/">C-like
</a> mode. Depends on XML,
57 JavaScript, CSS, HTMLMixed, and C-like modes.
</p>
59 <p><strong>MIME types defined:
</strong> <code>application/x-httpd-php
</code> (HTML with PHP code),
<code>text/x-php
</code> (plain, non-wrapped PHP code).
</p>