fork download
  1. <?php
  2. $test = array(1, 2, 2, 2, 3, 3);
  3.  
  4. if(count($test)==0){
  5. echo 'No elements here';
  6. }
  7.  
  8. elseif(count($test)==1){
  9. echo $test[0];
  10. }
  11.  
  12. else{
  13. //sort($test);
  14. $result=array_unique($test);
  15. echo $maximal= array_pop($result);
  16. echo $maximal= array_pop($result);
  17. }
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
32