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 characters
<?php | |
$lenguajes = array( | |
'servidor' => array('php', 'nodejs'), | |
'client' => array('javascript', 'html') | |
); | |
echo "count simple " . count($lenguajes); | |
echo "count with recursive ". count($lenguajes, COUNT_RECURSIVE); | |
?> |
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 characters
<?php | |
//By RianWap ID | |
//Created Date 19/10/2017 | |
//www.facebook.com/rianwap.id | |
if($_GET['v']){ | |
$v=$_GET['v']; | |
}else{ |
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 characters
<?php | |
?> |
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 characters
<?php | |
// function to generate random date between two dates with optional parameters | |
function randomDate($startDate, $endDate, $format = "Y-M-d H:i:s", $timezone = "gmt", $mode = "debug") | |
{ | |
$startDate = strtotime($startDate); | |
$endDate = strtotime($endDate); | |
switch ($mode) { | |
case "debug": | |
$rndDate = $startDate; | |
break; |
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 characters
<?php | |
abstract class Model { | |
public function get_object_name() | |
{ | |
return strtolower(get_class($this)); | |
} | |
public function get_props() | |
{ |
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 characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
<title>W3.CSS</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> | |
body { |
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 characters
<?php | |
$tests = 0; | |
$initialhealth = 5; | |
$total=0; | |
$timestorun=6*6*6*6*6*6; | |
while ($tests<$timestorun){ | |
$health = $initialhealth; | |
$rolls = 0; | |
while($health>0){ | |
$rolls++; |
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 characters
<?php | |
?> |
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 characters
<?php | |
//includes Simple HTML DOM Parser | |
include "simple_html_dom.php"; | |
//Mysqli initial code | |
require_once "dBug!.php"; | |
require "util/public_db_info.php"; | |
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 characters
<?php | |
echo "Yes, aku bisa PHP :)"; | |
echo "<br>"; | |
echo "Ternyata PHP itu mudah kawan"; | |
?> |