phc /test/subjects/codegen/empty.php

Language PHP Lines 34
MD5 Hash 7c1dac83ebabcc4d23ba356cdfd3d041 Estimated Cost $468 (why?)
Repository http://phc.googlecode.com/svn/trunk/ View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
	$stringNonEmpty = "foo";
	$stringEmpty = "";
	$stringZero = "0";

	$intNonZero = 1;
	$intZero = 0;
	
	$null = NULL;

	$boolTrue = true;
	$boolFalse = false;

	$arrayNonEmpty = array(1); 
	$arrayEmpty = array();

	var_dump(empty($notSet));

	var_dump(empty($stringNonEmpty));
	var_dump(empty($stringEmpty));
	var_dump(empty($stringZero));

	var_dump(empty($intNonZero));
	var_dump(empty($intZero));
	
	var_dump(empty($null));

	var_dump(empty($boolTrue));
	var_dump(empty($boolFalse));

	var_dump(empty($arrayNonEmpty));
	var_dump(empty($arrayEmpty));
?>
Back to Top