Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working for Food

Ahmad Oriza gemblue

🏠
Working for Food
View GitHub Profile
@gemblue
gemblue / index.html [1]
Created Apr 7, 2018
Clean Blog Tutorial
View index.html [1]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
@gemblue
gemblue / basic.php
Last active Sep 11, 2016
PHP Generator Function
View basic.php
<?php
// Get number
function get_one_two_three() {
for ($i = 1; $i <= 3; $i++) {
yield $i;
}
}
$result = get_one_two_three();
View Method Chaining
// Tanpa chaining
$kucing = new Hewan();
$kucing->mengeong();
$kucing->makan();
$kucing->tidur();
// Dengan chaining
$kucing = new Hewan();
$kucing->mengeong()->makan()->tidur();
You can’t perform that action at this time.