3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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?
Output for 7.0.0 - 7.3.0rc6
string(4) "7031" array(5) { [0]=> string(4) "8000" [1]=> string(5) "12345" [2]=> string(6) "6811-1" [3]=> string(4) "6841" [4]=> string(4) "7031" }
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.6.25
string(4) "7031" array(5) { [0]=> string(5) "12345" [1]=> string(6) "6811-1" [2]=> string(4) "6841" [3]=> string(4) "7031" [4]=> string(4) "8000" }
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/93ac5 on line 11
Process exited with code 255.