3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
90