Created
January 20, 2013 03:34
-
-
Save mufid/4576525 to your computer and use it in GitHub Desktop.
Tes PHP Templating
This file contains 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 characters
Haaai <?php echo $ganteng ?>, Aku adalah <?php print_r($hiyaa); ?> |
This file contains 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 characters
Haaai Benar, Aku adalah | |
Wuaaaa<br/>Di sini ganteng masih muncul<br/>Benar<br/> Haaai<br /> | |
<b>Notice</b>: Undefined variable: ganteng in <b>D:\dev\uni\www\progresioweb\tes.php</b> on line <b>14</b><br /> | |
<br/>Di sini semuanya sudah ganteng |
This file contains 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 characters
<?php | |
class Ganteng { | |
static function generate() { | |
$yeah = array("ganteng" => "Benar", "hiyaa" => "Wuaaaa"); | |
extract($yeah); | |
include "mantap.php"; | |
echo "<br/>Di sini ganteng masih muncul<br/>$ganteng"; | |
} | |
} | |
Ganteng::generate(); | |
echo "<br/> Haaai"; | |
echo "<br/>Di sini semuanya sudah ganteng $ganteng"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment