<!doctype html><html><head><metacharset="utf-8"><title>CodeMirror: PHP mode</title><linkrel="stylesheet"href="../../lib/codemirror.css"><scriptsrc="../../lib/codemirror.js"></script><scriptsrc="../../addon/edit/matchbrackets.js"></script><scriptsrc="../htmlmixed/htmlmixed.js"></script><scriptsrc="../xml/xml.js"></script><scriptsrc="../javascript/javascript.js"></script><scriptsrc="../css/css.js"></script><scriptsrc="../clike/clike.js"></script><scriptsrc="php.js"></script><styletype="text/css">.CodeMirror{border-top:1pxsolidblack;border-bottom:1pxsolidblack;}</style><linkrel="stylesheet"href="../../doc/docs.css"></head><body><h1>CodeMirror: PHP mode</h1><form><textareaid="code"name="code"><?phpfunctionhello($who){return"Hello ".$who;}?><p>The program says <?=hello("World")?>.</p><script>alert("And here is some JS code");// also colored</script></textarea></form><script>vareditor=CodeMirror.fromTextArea(document.getElementById("code"),{lineNumbers:true,matchBrackets:true,mode:"application/x-httpd-php",indentUnit:4,indentWithTabs:true,enterMode:"keep",tabMode:"shift"});</script><p>Simple HTML/PHP mode based on
the <ahref="../clike/">C-like</a> mode. Depends on XML,
JavaScript, CSS, HTMLMixed, and C-like modes.</p><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></body></html>