摘要: 在线运行PHPhttp://www.compileonline.com/execute_php_online.php 1 $a[$i] )37 {38 swap( $a[$n], $a[$i] );39 $i = $n;40 ... 阅读全文
posted @ 2014-11-12 19:02 crepesofwrath 阅读(359) 评论(0) 推荐(0) 编辑
摘要: http://www.mediawiki.org/wiki/Manual:Coding_conventions/PHPassignment作为expression来用看起来像个错误(looks surprising)// Noif ( $a = foo() ) { bar();}// Yes$... 阅读全文
posted @ 2014-11-10 18:32 crepesofwrath 阅读(232) 评论(1) 推荐(0) 编辑
摘要: 1 阅读全文
posted @ 2014-11-09 17:56 crepesofwrath 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1 0; $j--){22 if($a[$j] 阅读全文
posted @ 2014-11-09 17:35 crepesofwrath 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Red is current min. Yellow is sorted list. Blue is current item. 1 never happens, it means an ascending array already31 if($a[$j] > $a[$j... 阅读全文
posted @ 2014-11-09 16:12 crepesofwrath 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1 $a[$j+1]){30 swap($a[$j], $a[$j+1]);31 $n = 1;32 }33 }34 35 if($n == 0){ # no swap hap... 阅读全文
posted @ 2014-11-09 11:32 crepesofwrath 阅读(338) 评论(0) 推荐(0) 编辑