svn: /phpdoc/en/trunk/reference/funchand/functions/ create-function.xml

From: Date: Mon, 14 Mar 2011 09:36:25 +0000
Subject: svn: /phpdoc/en/trunk/reference/funchand/functions/ create-function.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7854@lists.php.net to get a copy of this message
shein Mon, 14 Mar 2011 09:36:25 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=309214 Log: Fixed some bugs in create_function examples. Changed paths: U phpdoc/en/trunk/reference/funchand/functions/create-function.xml Modified: phpdoc/en/trunk/reference/funchand/functions/create-function.xml =================================================================== --- phpdoc/en/trunk/reference/funchand/functions/create-function.xml 2011-03-14 08:58:28 UTC (rev 309213) +++ phpdoc/en/trunk/reference/funchand/functions/create-function.xml 2011-03-14 09:36:25 UTC (rev 309214) @@ -118,7 +118,7 @@ $garr = array( create_function('$b,$a', 'if (strncmp($a, $b, 3) == 0) return "** \"$a\" '. 'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)";'), - create_function('$a,$b', '; return "CRCs: " . crc32($a) . " , ".crc32(b);'), + create_function('$a,$b', '; return "CRCs: " . crc32($a) . ", ".crc32($b);'), create_function('$a,$b', '; return "similar(a,b) = " . similar_text($a, $b, &$p) . "($p%)";') ); echo "\nUsing the second array of anonymous functions\n"; @@ -135,12 +135,12 @@ a hypotenuse: 3.9199852871011 b*a^2 = 4.8103313314525 min(b^2+a, a^2,b) = 8.6382729035898 -ln(a/b) = 0.27122299212594 +ln(a)/b = 0.27122299212594 Using the second array of anonymous functions ** "Twas the night" and "Twas brilling and the slithy toves" ** Look the same to me! (looking at the first 3 chars) -CRCs: -725381282 , 1908338681 +CRCs: -725381282, 342550513 similar(a,b) = 11(45.833333333333%) ]]> </screen>

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