- var_dump: documentation ( source)
- fopen: documentation ( source)
<?php
$foo = '';
$testone = 0;
$testtwo = 0.0;
$testthree = array();
$testfour = fopen("http://ya.ru", "r");
if(empty($foo))
echo "Foo is empty - ". gettype($foo); // Foo is empty - string
if(empty($bar))
echo 'Bar is empty too - '. gettype($bar); // Notice: Undefined variable: bar in /in/kCIj8 on line 7 Bar is empty too - NULL
if(empty($testone))
echo 'Testone is empty - '.gettype($testone);
if(empty($testtwo))
echo 'Testtwo is empty - '.gettype($testtwo);
if(empty($testthree))
echo 'Testthree is empty - '.gettype($testthree);
if(empty($testfour))
echo 'Testfour is empty'.gettype($testfour);
else
echo "Testfour's not empty";
var_dump($testfour);
?>