3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cha12 = array(); $cha1_count = 3; $cha2_count = 3; $cha12[0][0] = 3; $cha12[0][1] = 6; $cha12[0][2] = 2; $cha12[1][0] = 4; $cha12[1][1] = 5; $cha12[1][2] = 3; $cha12[2][0] = 2; $cha12[2][1] = 2; $cha12[2][2] = 8; $fcount = 0; $fcount_array = array(); for($count1=0;$count1<$cha1_count;$count1++){ for($count2=0;$count2<$cha2_count;$count2++){ if($fcount == 0){ $fcount_array[$fcount] = $cha12[$count1][$count2]; $fcount++; } else { for($fc=0;$fc<$fcount;$fc++){ if($fcount_array[$fc] == $cha12[$count1][$count2]) continue 2; } $fcount_array[$fcount] = $cha12[$count1][$count2]; $fcount++; } } } //print_r($fcount_array); echo "kk"; //$cm: cha1とcha2の短い方の値 //$nc: 現在足している要素の数 //$sum: 合計 /*function loop($cm,$nc){ if($nc > $cm){ $sum = -1; } else { */ ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
kk