This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 数据表结构markdown格式 | |
* @author iamsujun <[email protected]> | |
* | |
* @example 返回markdown格式示例: | |
* ### picture | |
* | Field | Type | Null | Default | Comment | | |
* |--|--|--|--|--| | |
* | iAutoID | int(11) | NO | | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 多层嵌套简单梳理 | |
*/ | |
$child_to_parent = array( | |
1 => 0, | |
2 => 0, | |
3 => 1, | |
4 => 1, | |
5 => 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo (0.58*100) . "<br>"; //58 | |
echo (int)(0.58*100) . "<br>"; //57 | |
echo (1234.11 * 100) . "<br>"; //123411 | |
echo (int)(1234.11 * 100) . "<br>"; //123410 | |
echo intval(1234.12 * 100) . "<br>"; //123411 | |
echo floor(( 0.1 + 0.7 ) * 10) . "\n"; //返回 7 而不是8, | |
echo (int)(( 0.1 + 0.7 ) * 10) . "\n"; //返回7而不是8. |