View fiddle_075706.php
<?php
class First{
public function printP(){
print('P is great!');
}
}
class Second{
View 6552a3198e54a1dc3948b050722912a8.php
<?php
$class = "Level 1";
$random = rand(0,3);
if($random==0)
{
$class = "Level 2";
}
elseif($random==1)
{
View fiddle_094226.php
<?php
$class = "Level 1";
$random = rand(0,3);
if($random==0)
{
$class = "Level 2";
}
elseif($random==1)
{
View fiddle_059375.php
<?php
$age = 0;
$message0 = "At first, ";
$message1 = "you are age ";
$message2 = "After a while: ";
$message3 = "you die!";
echo ($message0);
while($age<50){
View fiddle_071573.php
<?php
$rows = [
'row1' => [
'color' => 'red',
'width' => '550px',
'img' => 'http://www.google.com.au/images/srpr/logo11w.png'
],
'row2' => [
'color' => 'black',
View fiddle_046804.php
<?php
function getClass(){
$class = "Level 1";
$random = rand(0,3);
if($random==0)
{
$class = "Level 2";
}
elseif($random==1)
View bd9ac5ec00167eb9270326e5655c7c3b.php
<?php
$level=1;
while($level<50){
$random = rand(0,3);
if($random==0){
echo ("Level 0 message!<br/>");
$level += 10;
}
elseif($random==1){
echo ("Level 1 message!<br/>");
View fiddle_014530.php
<?php
function goOn($number){
for($i=0; $i < $number; $i++){
$name = "Apprentice";
$random = rand(0,3);
if($random==0)
{
$name = "Intermediate Apprentice <br/>";
}
View 19c763e8e5d37d254c5f98549b3ddb64.php
<?php
/**
*
* cURL and XML parsing.
*
*/
$url = "http://www.w3schools.com/xml/simple.xml";
$ch = curl_init();
View fiddle_015091.php
<?php
// Function to test for time overlap
// $start_time A start date YYYY-MM-DD HH:MM:SS
// $end_time An end date YYYY-MM-DD HH:MM:SS
// $times An array of times to match against
// Returns true if there is an overlap false if no overlap is found
function time_overlap($start_time, $end_time, $times){
$ustart = strtotime($start_time);
$uend = strtotime($end_time);