Created
December 11, 2017 18:02
-
-
Save ta-riq/3806a018805b13a68dea78ac6aeeb0dc to your computer and use it in GitHub Desktop.
Revisions
-
ta-riq created this gist
Dec 11, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Php supports 'C', 'C++' and Unix shell-style (Perl style) comments. For example: <?php echo 'This is a test'; // This is a one-line c++ style comment /* This is a multi line comment yet another line of comment */ echo 'This is yet another test'; echo 'One Final Test'; # This is a one-line shell-style comment ?> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ <?php //====================================================================== // CATEGORY LARGE FONT //====================================================================== //----------------------------------------------------- // Sub-Category Smaller Font //----------------------------------------------------- /* Title Here Notice the First Letters are Capitalized */ # Option 1 # Option 2 # Option 3 /* * This is a detailed explanation * of something that should require * several paragraphs of information. */ // This is a single line quote. ?> <?php <!------------------------Text1----------------------START--> echo "Some text goes here"; <!------------------------Text1----------------------END--> <!------------------------Text2----------------------START--> echo "Some text goes here"; <!------------------------Text2----------------------END--> ?> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ Comments do NOT take up processing power. So, for all the people who argue that comments are undesired because they take up processing power now have no reason to comment ;) <?php // Control echo microtime(), "<br />"; // 0.25163600 1292450508 echo microtime(), "<br />"; // 0.25186000 1292450508 // Test echo microtime(), "<br />"; // 0.25189700 1292450508 # TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST # .. Above comment repeated 18809 times .. echo microtime(), "<br />"; // 0.25192100 1292450508 ?> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ Make sure you don't nest 'C' style comments. It is easy to make this mistake if you are trying to comment out a large block of code. <?php /* echo 'This is a test'; /* This comment will cause a problem */ */ ?> Be careful when commenting out regular expressions. E.g. the following causes a parser error. <?php /* $f->setPattern('/^\d.*/'); */ ?>