3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetBetween($content,$start,$end){ $r = explode($start, $content); if (isset($r[1])){ $r = explode($end, $r[1]); return $r[0]; } return ''; } echo GetBetween('foo test bar', 'foo', 'bar'); $var=explode('foo','foo test bar'); print_r( $var); //print_r(explode("help","help php help program help is good")); ?>

preferences:
41.86 ms | 402 KiB | 5 Q