For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > June 2004 > cvs: phpdoc /en/language types.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/language types.xml
Jakub Vrana

2004-06-29, 8:56 am

vrana Tue Jun 29 04:09:23 2004 EDT

Modified files:
/phpdoc/en/language types.xml
Log:
Example to boolean (#28950)

http://cvs.php.net/diff.php/phpdoc/...7&r2=1.138&ty=u
Index: phpdoc/en/language/types.xml
diff -u phpdoc/en/language/types.xml:1.137 phpdoc/en/language/types.xml:1.138
--- phpdoc/en/language/types.xml:1.137 Wed May 5 16:19:50 2004
+++ phpdoc/en/language/types.xml Tue Jun 29 04:09:22 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.137 $ -->
+<!-- $Revision: 1.138 $ -->
<chapter id="language.types">
<title>Types</title>

@@ -293,13 +293,14 @@
<programlisting role="php">
<![CDATA[
<?php
-echo gettype((bool) ""); // bool(false)
-echo gettype((bool) 1); // bool(true)
-echo gettype((bool) -2); // bool(true)
-echo gettype((bool) "foo"); // bool(true)
-echo gettype((bool) 2.3e5); // bool(true)
-echo gettype((bool) array(12)); // bool(true)
-echo gettype((bool) array()); // bool(false)
+var_dump((bool) ""); // bool(false)
+var_dump((bool) 1); // bool(true)
+var_dump((bool) -2); // bool(true)
+var_dump((bool) "foo"); // bool(true)
+var_dump((bool) 2.3e5); // bool(true)
+var_dump((bool) array(12)); // bool(true)
+var_dump((bool) array()); // bool(false)
+var_dump((bool) "false"); // bool(true)
?>
]]>
</programlisting>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com