CodeMirror: PHP mode

1
<?php
2
function hello($who) {
3
    return "Hello " . $who;
4
}
5
?>
6
<p>The program says <?= hello("World") ?>.</p>
7
<script>
8
    alert("And here is some JS code"); // also colored
9
</script>
10
 
 
 

Simple HTML/PHP mode based on the C-like mode. Depends on XML, JavaScript, CSS, HTMLMixed, and C-like modes.

MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).