Skip to main content
added 37 characters in body
Source Link
Taylor Raine
  • 8.7k
  • 2
  • 27
  • 51

PHP, 69 bytes

usort($x,function($a,$b){return strlen($b)<=>strlen($a);});echo$x[0];

usort($x,function($a,$b){return strlen($b)<=>strlen($a);});echo$x[0];

Not a trick or nice golfing, just sorting array by string length and then outputting the first element.

PHP, 69 bytes

usort($x,function($a,$b){return strlen($b)<=>strlen($a);});echo$x[0];

Not a trick or nice golfing, just sorting array by string length and then outputting the first element.

PHP, 69 bytes

usort($x,function($a,$b){return strlen($b)<=>strlen($a);});echo$x[0];

Not a trick or nice golfing, just sorting array by string length and then outputting the first element.

Source Link
Krzysiu
  • 481
  • 4
  • 7

PHP, 69 bytes

usort($x,function($a,$b){return strlen($b)<=>strlen($a);});echo$x[0];

Not a trick or nice golfing, just sorting array by string length and then outputting the first element.