View fiddle_052900.php
<?php
function treatNode($node)
{
if ($node->hasChildNodes()) {
foreach ($node->childNodes as $child){
treatNode($child);
}
} else {
View fiddle_049292.php
<?php
echo 'test';
?>
View fiddle_015515.php
<?php
echo 'test';
?>
View fiddle_084209.php
<?php
$secret = 'onveilig gedeeld geheim';
$timeout = time() + 60*60; //1h signature expire, timeout in seconds
$parameters = array( //parameters example
'timeout' => $timeout,
'Sat' => '',
'a' => '1 vet',
'b' => '2 gaaf'
);
ksort($parameters);
View fiddle_049188.php
<?php
$year = 1600;
$dBy4 = gmp_div_r($year, 4);
$answer = 'Not a Leap year';
if($dBy4 == 0) {
$dBy100 = gmp_div_r($year, 100);
$dBy400 = gmp_div_r($year, 400);
if($dBy100 == 0 && $dBy400 == 0) {
$answer = $year.' is a leap year';
}
View fiddle_094838.php
<?php
function textPrepare ($input)
{
//clear tags, convert chars to html units,
$input=strip_tags($input, '<br>'); //$input=strip_tags($input, '<br>');
$input=strtolower($input);
$input=htmlentities($input);
return $input;
};
$text="This is the @ world we created! 1-2+3";
View fiddle_015516.php
<?php
$json = '{
"products": [{
"apr": 3.984,
"armIndex": "",
"closingCost": 2584.0,
"lastUpdate": "2017-11-06T08:27:05.607",
"loanTerm": "30 Yr",
"lockPeriod": 30,
View fiddle_069852.php
<style>
table {
border-collapse: collapse;
}
table,th,td {
border: 1px solid black;
}
</style>
<?php
View fiddle_077471.php
<?php
$key = 2;//(int)rand(1,3);
function encode($str,$k)
{
$newstring = '';
foreach(range(0,strlen($str)-1) as $i)
{
$newstring .= chr(ord($str[$i])+$k);
View fiddle_038498.php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.shopvox.com/v1/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,