software entwicklung
it beratung
training
christian grauer
infosophie
Advanced Search

Search Entries

Title

Technologie

Code

Comments

Context

Title Technologie Code
isset, is_null, ==, === PHP
<?php

class Comparison {

private $pflaumenbaum;

public function __construct() {

echo "<br>IS_NULL(declared var without value): " . is_null($this->pflaumenbaum);
echo "<br>ISSET(declared var without value): " . isset($this->pflaumenbaum);
echo "<br>(true == declared var without value): " . (true == $this->hollebolle);
echo "<br>(true === declared var without value): " . (true === $this->hollebolle);
echo "<br>";
echo "<br>IS_NULL(not existing var): " . is_null($this->hollebolle);
echo "<br>ISSET(not existing var): " . isset($this->hollebolle);
echo "<br>(true == not existing var): " . (true == $this->hollebolle);
echo "<br>(true === not existing var): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = null;
echo "<br>IS_NULL(var containing null): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing null): " . isset($this->hollebolle);
echo "<br>(true == var containing null): " . (true == $this->hollebolle);
echo "<br>(true === var containing null): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = "";
echo "<br>IS_NULL(var containing empty string): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing empty string): " . isset($this->hollebolle);
echo "<br>(true == var containing empty string): " . (true == $this->hollebolle);
echo "<br>(true === var containing empty string): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = 0;
echo "<br>IS_NULL(var containing 0): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing 0): " . isset($this->hollebolle);
echo "<br>(true == var containing 0): " . (true == $this->hollebolle);
echo "<br>(true === var containing 0): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = "hollebolle";
echo "<br>IS_NULL(var containing string): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing string): " . isset($this->hollebolle);
echo "<br>(true == var containing string): " . (true == $this->hollebolle);
echo "<br>(true === var containing string): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = true;
echo "<br>IS_NULL(var containing true): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing true): " . isset($this->hollebolle);
echo "<br>(true == var containing true): " . (true == $this->hollebolle);
echo "<br>(true === var containing true): " . (true === $this->hollebolle);
echo "<br>";
$this->hollebolle = false;
echo "<br>IS_NULL(var containing false): " . is_null($this->hollebolle);
echo "<br>ISSET(var containing false): " . isset($this->hollebolle);
echo "<br>(true == var containing false): " . (true == $this->hollebolle);
echo "<br>(true === var containing false): " . (true === $this->hollebolle);
echo "<br>";
unset($this->hollebolle);
echo "<br>IS_NULL(unset var): " . is_null($this->hollebolle);
echo "<br>ISSET(unset var): " . isset($this->hollebolle);
echo "<br>(true == unset var): " . (true == $this->hollebolle);
echo "<br>(true === unset var): " . (true === $this->hollebolle);
}

}

$comparison = new Comparison();

Set ViewPort for mobile devices HTML
{meta name="viewport" content="width=device-width, initial-scale=1.0"}
Wo ist Grub installiert? Linux
sudo fdisk -l 2>/dev/null | egrep "Disk /|/dev/" | sed "s#^/dev/#Part /dev/#" | awk '{print $2}' | sed 's/://' | xargs -n1 -IX sudo sh -c "dd if=X bs=1 count=512 2>/dev/null | grep GRUB > /dev/null && echo Grub gefunden: X || echo Kein Grub: X"