Skip to content

Instantly share code, notes, and snippets.

@mufid
Created January 20, 2013 03:34
Show Gist options
  • Save mufid/4576525 to your computer and use it in GitHub Desktop.
Save mufid/4576525 to your computer and use it in GitHub Desktop.
Tes PHP Templating
Haaai <?php echo $ganteng ?>, Aku adalah <?php print_r($hiyaa); ?>
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
<?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