3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function string_between($string, $start, $end) { $parts = explode($start, $string); if (isset($parts[1])) { $parts = explode($end, $parts[1]); return $parts[0]; } return null; } echo string_between('volume: 90%', 'volume: ', '%');
Output for 4.3.0 - 7.2.0
90