3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $type = ''; $index = -1; $t = "audio/x-wav-chunk; index=10"; $_p = strpos($t, ';'); if ($_p !== false) $type = substr($t, 0, $_p); $_p = strpos($t, 'index='); if ($_p !== false) $index = (int)substr($t, $_p + 6); print_r($type); print_r($index);
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.0
audio/x-wav-chunk10