svn: /phpdoc/en/trunk/reference/var/functions/ is-float.xml is-int.xml is-numeric.xml is-object.xml is-string.xml

From: Date: Sun, 04 Apr 2010 20:03:29 +0000
Subject: svn: /phpdoc/en/trunk/reference/var/functions/ is-float.xml is-int.xml is-numeric.xml is-object.xml is-string.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6313@lists.php.net to get a copy of this message
wiesemann Sun, 04 Apr 2010 20:03:29 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297477 Log: coding standards Changed paths: U phpdoc/en/trunk/reference/var/functions/is-float.xml U phpdoc/en/trunk/reference/var/functions/is-int.xml U phpdoc/en/trunk/reference/var/functions/is-numeric.xml U phpdoc/en/trunk/reference/var/functions/is-object.xml U phpdoc/en/trunk/reference/var/functions/is-string.xml Modified: phpdoc/en/trunk/reference/var/functions/is-float.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/is-float.xml 2010-04-04 19:52:30 UTC (rev 297476) +++ phpdoc/en/trunk/reference/var/functions/is-float.xml 2010-04-04 20:03:29 UTC (rev 297477) @@ -52,10 +52,10 @@ <programlisting role="php"> <![CDATA[ <?php -if(is_float(27.25)) { - echo "is float\n"; -}else { - echo "is not float\n"; +if (is_float(27.25)) { + echo "is float\n"; +} else { + echo "is not float\n"; } var_dump(is_float('abc')); var_dump(is_float(23)); Modified: phpdoc/en/trunk/reference/var/functions/is-int.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/is-int.xml 2010-04-04 19:52:30 UTC (rev 297476) +++ phpdoc/en/trunk/reference/var/functions/is-int.xml 2010-04-04 20:03:29 UTC (rev 297477) @@ -54,9 +54,9 @@ <![CDATA[ <?php if (is_int(23)) { - echo "is integer\n"; + echo "is integer\n"; } else { - echo "is not an integer\n"; + echo "is not an integer\n"; } var_dump(is_int(23)); var_dump(is_int("23")); Modified: phpdoc/en/trunk/reference/var/functions/is-numeric.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/is-numeric.xml 2010-04-04 19:52:30 UTC (rev 297476) +++ phpdoc/en/trunk/reference/var/functions/is-numeric.xml 2010-04-04 20:03:29 UTC (rev 297477) @@ -55,7 +55,7 @@ <programlisting role="php"> <![CDATA[ <?php -$tests = Array( +$tests = array( "42", 1337, "1e4", @@ -64,14 +64,10 @@ 9.1 ); -foreach($tests as $element) -{ - if(is_numeric($element)) - { +foreach ($tests as $element) { + if (is_numeric($element)) { echo "'{$element}' is numeric", PHP_EOL; - } - else - { + } else { echo "'{$element}' is NOT numeric", PHP_EOL; } } Modified: phpdoc/en/trunk/reference/var/functions/is-object.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/is-object.xml 2010-04-04 19:52:30 UTC (rev 297476) +++ phpdoc/en/trunk/reference/var/functions/is-object.xml 2010-04-04 20:03:29 UTC (rev 297477) @@ -53,20 +53,19 @@ // array from our object function get_students($obj) { - if(!is_object($obj)) - { - return(false); + if (!is_object($obj)) { + return false; } - return($obj->students); + return $obj->students; } // Declare a new class instance and fill up // some values -$obj = new stdClass; -$obj->students = Array('Kalle', 'Ross', 'Felipe'); +$obj = new stdClass(); +$obj->students = array('Kalle', 'Ross', 'Felipe'); -var_dump(get_students(NULL)); +var_dump(get_students(null)); var_dump(get_students($obj)); ?> ]]> Modified: phpdoc/en/trunk/reference/var/functions/is-string.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/is-string.xml 2010-04-04 19:52:30 UTC (rev 297476) +++ phpdoc/en/trunk/reference/var/functions/is-string.xml 2010-04-04 20:03:29 UTC (rev 297477) @@ -46,9 +46,9 @@ <![CDATA[ <?php if (is_string("23")) { - echo "is string\n"; + echo "is string\n"; } else { - echo "is not an string\n"; + echo "is not an string\n"; } var_dump(is_string('abc')); var_dump(is_string("23"));

« previous php.doc.cvs (#6313) next »