Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
phpfiddle / fiddle_027137.php
Created October 20, 2017 22:01
[ Posted by José ] La función count de php y su segundo parametro COUNT_RECURSIVE
<?php
$lenguajes = array(
'servidor' => array('php', 'nodejs'),
'client' => array('javascript', 'html')
);
echo "count simple " . count($lenguajes);
echo "count with recursive ". count($lenguajes, COUNT_RECURSIVE);
?>
@phpfiddle
phpfiddle / fiddle_050602.php
Created October 19, 2017 12:11
[ Posted by RianWap ] Youtube Downloader Mp4 Easy way
<?php
//By RianWap ID
//Created Date 19/10/2017
//www.facebook.com/rianwap.id
if($_GET['v']){
$v=$_GET['v'];
}else{
@phpfiddle
phpfiddle / fiddle_047527.php
Created October 19, 2017 07:12
[ Posted by Miguel Ruiz ] dfasdfaffa
<?php
?>
@phpfiddle
phpfiddle / fiddle_031856.php
Created October 16, 2017 15:47
[ Posted by Hasan ] function to generate random date between two initial dates
<?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;
@phpfiddle
phpfiddle / fiddle_056691.php
Created October 13, 2017 10:53
[ Posted by Ikechukwu ] abstract sql query commands for use anywhere within the program
<?php
abstract class Model {
public function get_object_name()
{
return strtolower(get_class($this));
}
public function get_props()
{
@phpfiddle
phpfiddle / fiddle_093716.php
Created October 9, 2017 11:12
[ Posted by Owolabi Blo ] property link work code lalll
<!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 {
@phpfiddle
phpfiddle / fiddle_040557.php
Created October 6, 2017 16:34
[ Posted by Yanni ] Brute Force of possible RPG Mechanics
<?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++;
@phpfiddle
phpfiddle / fiddle_019674.php
Created September 28, 2017 05:55
[ Posted by Simon511000 ] test, pour la classe 3eme A
<?php
?>
@phpfiddle
phpfiddle / fiddle_074763.php
Created September 27, 2017 14:43
[ Posted by Shuwi ] newParser_vspo
<?php
//includes Simple HTML DOM Parser
include "simple_html_dom.php";
//Mysqli initial code
require_once "dBug!.php";
require "util/public_db_info.php";
@phpfiddle
phpfiddle / fiddle_077794.php
Created September 13, 2017 14:53
[ Posted by Suwito ] PHP itu Mudah
<?php
echo "Yes, aku bisa PHP :)";
echo "<br>";
echo "Ternyata PHP itu mudah kawan";
?>