3v4l.org

run code in 300+ PHP versions simultaneously
<?php $new_array = array( "8000", "12345", "6811-1", "7031", "6841" ); var_dump(max($new_array)); // would expect 8000, but returns 7031 sort($new_array); var_dump($new_array); // the sorted array is wonky... why isn't 8000 at the end?

preferences:
72.05 ms | 406 KiB | 5 Q