run code in 200+ php & hhvm versions
Bugs & Features
<?php function get_string_between($string, $start, $end){ $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return trim(substr($string,$ini,$len)); } $str = " -- Dennis R. O'Brien President • O'Brien Targeted Marketing • 3135 State Rd 580 • Safety Harbor, FL 34695 Direct 231.206.8816 • Fax 888.590.2750 • denny@customertrack.net This e-mail is subject to the Electronics Communications Privacy Act,18 U.S.C. §§2510-2521. This e-mail communication and any attachments may containconfidential and privileged information for the use of the designated recipients namedabove. If you are not the intended recipient, you are hereby notified that you havereceived this communication in error and that any review, disclosure, dissemination,distribution or copying of it or its contents is prohibited. If you have received thiscommunication in error, please delete the communication. Date: Sat, 28 Jun 2014 13:14:35 -0700 To: wm3192@hotmail.com; tvnielsen@charter.net; markvanhook@gmail.com Subject: Form Submission from Your Hot Leads From: no-reply@yourhotleads.com Form Submission from Your Hot LeadsDownload CSV file of registered information. Name: Walkers Renton Mazda Contact Name: Zachary Phone: Camacho Email: zc32low@gmail.com "; var_dump(get_string_between($str, "Name: ", "Contact Name:"));
based on A8pu2
Output for 4.3.0 - 7.2.6
string(20) "Walkers Renton Mazda"