<!DOCTYPE html> <html> <head> <title>Includes</title> </head> <body> <?php include 'some_text.php'; ?> <?php require 'some_text.php'; ?> <?php require_once 'include_functions.php'; ?> <?php require_once 'include_functions.php'; ?> <?php xyz(); ?> </body> </html>
/** * A very long and complicated class method */ public function example12() { if ($a == $b) { if ($a1 == $b1) { fiddle(); } else { if ($a2 == $b2) { fiddle(); } else { fiddle(); } } } else { if ($c == $d) { while ($c == $d) { fiddle(); } } else { if ($e == $f) { for ($n = 0; $n < $h; $n++) { fiddle(); } } else { switch ($z) { case 1: fiddle(); break; case 2: fiddle(); break; case 3: fiddle(); break; default: fiddle(); break; } } } } if ($a == $b) { if ($a1 == $b1) { fiddle(); } else { if ($a2 == $b2) { fiddle(); } else { fiddle(); } } } else { if ($c == $d) { while ($c == $d) { fiddle(); } } else { if ($e == $f) { for ($n = 0; $n < $h; $n++) { fiddle(); } } else { switch ($z) { case 1: fiddle(); break; case 2: fiddle(); break; case 3: fiddle(); break; default: fiddle(); break; } } } } // Just to make sure the class method is very long abc(); xyz(); abc(); xyz(); abc(); xyz(); abc(); xyz(); }
<html> <head> <title><?php echo $title; ?> </title> <sometag><? echo $nothing; // comment ?></sometag> <script type='javascript'> document.getElementById('content').innerHTML += <?php echo $some_content; ?> /* COMMENT <?php echo 'this is a comment in the javascript but a string in the php'; ?> STILL A COMMENT <? xyz() ?> */ var str = "this is<?php echo ' a '; ?> string"; var str = 'this is<?php echo ' a '; ?> string'; // this is <?php echo 'a?>'; ?> comment <?php echo ''; ?> ... still