3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '0000-0024-0055-'; $str = rtrim($str,'-'); $codes = explode('-',$str); var_dump($codes); $maxCode = (int)array_pop($codes); var_dump($maxCode);
based on 86Y4M
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0alpha1
array(3) { [0]=> string(4) "0000" [1]=> string(4) "0024" [2]=> string(4) "0055" } int(55)