3v4l.org

run code in 300+ PHP versions simultaneously
<?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; if($len < 1) return trim(substr($string,$ini)); return trim(substr($string,$ini,$len)); } function FS($msg){ return array( "Dealer" => get_string_between($msg, "Name:", "Contact Name:"), "Contact" => get_string_between($msg, "Contact Name:", "Phone:"), "Phone" => get_string_between($msg, "Phone:", "Email:"), "Email" => get_string_between($msg, "Email:", "*"), ); } $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(FS($str));

preferences:
57.76 ms | 402 KiB | 5 Q