3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = <<<TEXT <div style="font-family:Verdana;font-size:10pt;color:#000000;"><div><div style="font-family:Verdana;font-size:10pt;color:#000000;"><div><div style="font-family:Verdana;font-size:10pt;color:#000000;"><div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica, Arial, sans-serif;font-size:12pt;"><div class="WordSection1"><div><p class="MsoNormal"><br /></p><div><p class="MsoNormal">-------- Forwarded Message -------- </p><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td valign="top" style="padding:0in 0in 0in 0in;"><p class="MsoNormal" align="right" style="text-align:right;"><b>Subject: </b></p></td><td style="padding:0in 0in 0in 0in;"><p class="MsoNormal">RE: VUIT - Revised Wolfram Exhibit A</p></td></tr><tr><td valign="top" style="padding:0in 0in 0in 0in;"><p class="MsoNormal" align="right" style="text-align:right;"><b>Date: </b></p></td><td style="padding:0in 0in 0in 0in;"><p class="MsoNormal">Fri, 4 Dec 2015 16:34:25 +0000</p></td></tr><tr><td valign="top" style="padding:0in 0in 0in 0in;"><p class="MsoNormal" align="right" style="text-align:right;"><b>From: </b></p></td><td style="padding:0in 0in 0in 0in;"><p class="MsoNormal">Montefiori, Karen E <a href="mailto:karen.montefiori@Vanderbilt.Edu">&lt;karen.montefiori@Vanderbilt.Edu&gt;</a></p></td></tr><tr><td valign="top" style="padding:0in 0in 0in 0in;"><p class="MsoNormal" align="right" style="text-align:right;"><b>To: </b></p></td><td style="padding:0in 0in 0in 0in;"><p class="MsoNormal">Troy Schaudt <a href="mailto:troys@wolfram.com">&lt;troys@wolfram.com&gt;</a></p></td></tr><tr><td valign="top" style="padding:0in 0in 0in 0in;"><p class="MsoNormal" align="right" style="text-align:right;"><b>CC: </b></p></td><td style="padding:0in 0in 0in 0in;"><p class="MsoNormal">Montefiori, Karen E <a href="mailto:karen.montefiori@Vanderbilt.Edu">&lt;karen.montefiori@Vanderbilt.Edu&gt;</a></p></td></tr></tbody></table><p class="MsoNormal"><br /><br /><br /><span style="font-size:12pt;font-family:''Times New Roman'', serif;"></span></p><p class="MsoNormal"><span style="color:#1f497d;">Hi Troy,</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Thank you.</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Regarding the 2018 renewal, are you able to provide expected pricing for VU and VUMC along with the expected contract language for each entity?</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Best,</span></p><p class="MsoNormal"><span style="color:#1f497d;">Karen</span></p><p class="MsoNormal"><span style="font-size:10pt;color:#1f497d;">---<br /><b>Karen Montefiori | Sourcing Analyst | Information Technology | Vanderbilt University</b> <br /><a href="mailto:karen.montefiori@vanderbilt.edu"><span style="color:#0563c1;">karen.montefiori@vanderbilt.edu</span></a> | phone 615.343.1630 | <a href="http://it.vanderbilt.edu/" title="Vanderbilt IT">it.vanderbilt.edu</a></span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><div><div style="border:none;border-top:solid #E1E1E1 1pt;padding:3pt 0in 0in 0in;"><p class="MsoNormal"><b><span>From:</span></b><span> Troy Schaudt [<a href="mailto:troys@wolfram.com">mailto:troys@wolfram.com</a>] <br /><b>Sent:</b> Friday, December 4, 2015 8:26 AM<br /><b>To:</b> Montefiori, Karen E <a href="mailto:karen.montefiori@Vanderbilt.Edu">&lt;karen.montefiori@Vanderbilt.Edu&gt;</a><br /><b>Subject:</b> Re: VUIT - Revised Wolfram Exhibit A</span></p></div></div><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom:12pt;">Hi Karen,<br /><br />I''m getting the requested language added into the agreement and will send the Exhibit A your way again once that has been approved.  I realize per your email below that you expect VUMC to obtain their own agreement in 2018, but I wanted to reinforce that we''ll definitely need to revisit that when that time comes.  The pricing will be based on those two separate agreements at that time.<br /><br />Troy<br /><br /><br /></p><div><p class="MsoNormal">On 11/23/2015 12:29 PM, Montefiori, Karen E wrote:</p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><p class="MsoNormal"><span style="color:#1f497d;">Hi Troy,</span></p><p class="MsoNormal"><span style="color:#1f497d;"><br />We would expect VUMC to obtain its own agreement for Mathematica by the time the current agreement expires in 2018.</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Karen</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><div><div style="border:none;border-top:solid #E1E1E1 1pt;padding:3pt 0in 0in 0in;"><p class="MsoNormal"><b><span>From:</span></b><span> Troy Schaudt [<a href="mailto:troys@wolfram.com">mailto:troys@wolfram.com</a>] <br /><b>Sent:</b> Monday, November 23, 2015 8:36 AM<br /><b>To:</b> Montefiori, Karen E <a href="mailto:karen.montefiori@Vanderbilt.Edu">&lt;karen.montefiori@Vanderbilt.Edu&gt;</a><br /><b>Subject:</b> Re: VUIT - Revised Wolfram Exhibit A</span></p></div></div><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom:12pt;">Hi Karen,<br /><br />We just signed a new agreement this past May, as you know.  When the next agreement comes around, in 2018, will it be Vandy''s intention to remove the Medical Center or to keep it included?<br /><br />Troy<br /><br /><br /><br /></p><div><p class="MsoNormal">On 11/20/2015 5:52 PM, Montefiori, Karen E wrote:</p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><p class="MsoNormal"><span style="color:#1f497d;">Troy,</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Here is an outline of the changes.  Please forward to Wolfram legal for review.  </span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal" style="margin-left:.45in;line-height:7.85pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;letter-spacing:.05pt;">9.6 </span><span style="font-size:7pt;font-family:Arial, sans-serif;">   The parties acknowledge that Licensee intends to effect a restructuring arrangement (the “Restructuring”) pursuant to which Licensee will sell all of its clinical health care assets and businesses to Vanderbilt University Medical Center, a Tennessee non-profit corporation designated by Licensee (“VUMC”).  Following the closing of the Restructuring (the “Restructuring Effective Date”) the parties desire to allow the Affiliated Individuals of VUMC to use the Products under the Agreement (including all Exhibits and Addenda thereto) in the same manner as the Affiliated Individuals of Licensee.  Accordingly, from and after the closing of the Restructuring, the term “Licensee” as used in the Agreement (including all Exhibits and Addenda thereto) shall refer to Vanderbilt University and VUMC, collectively; provided that Vanderbilt University shall remain solely responsible for any and all obligations and liabilities of Licensee under the Agreement.</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal" style="margin-top:12.1pt;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;">                                        Wolfram Research, Inc.                                                                                  Vanderbilt University</span></p><p class="MsoNormal" style="margin-top:12.1pt;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;">Signature: <span style="text-decoration:underline;">                                                                                     </span>                                Signature: <span style="text-decoration:underline;">                                                                             </span></span></p><p class="MsoNormal" style="margin-top:12.1pt;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;">Name: <span style="text-decoration:underline;">                                                                                          </span>                                Name: <span style="text-decoration:underline;">                                                                                  </span></span></p><p class="MsoNormal" style="margin-top:12.1pt;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;">Title: <span style="text-decoration:underline;">                                                                                            </span>                                Title: <span style="text-decoration:underline;">                                                                                    </span></span></p><p class="MsoNormal" style="margin-right:0in;margin-bottom:.0001pt;margin-left:1.35in;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;"> </span></p><p class="MsoNormal" style="margin-right:0in;margin-bottom:.0001pt;margin-left:1.35in;line-height:7.9pt;vertical-align:baseline;"><span style="font-size:7pt;font-family:Arial, sans-serif;">Contract # 6506                                                                                          November ___, 2015</span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;">Thank you,</span></p><p class="MsoNormal"><span style="color:#1f497d;">Karen</span></p><p class="MsoNormal"><span style="font-size:10pt;color:#1f497d;">---<br /><b>Karen Montefiori | Sourcing Analyst | Information Technology | Vanderbilt University</b> <br /><a href="mailto:karen.montefiori@vanderbilt.edu"><span style="color:#0563c1;">karen.montefiori@vanderbilt.edu</span></a> | phone 615.343.1630 | <a href="http://it.vanderbilt.edu/" title="Vanderbilt IT">it.vanderbilt.edu</a></span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><p class="MsoNormal"><span style="color:#1f497d;"> </span></p><div><div style="border:none;border-top:solid #E1E1E1 1pt;padding:3pt 0in 0in 0in;"><p class="MsoNormal"><b>From:</b> Troy Schaudt [<a href="mailto:troys@wolfram.com">mailto:troys@wolfram.com</a>] <br /><b>Sent:</b> Friday, November 20, 2015 4:22 PM<br /><b>To:</b> Montefiori, Karen E <a href="mailto:karen.montefiori@Vanderbilt.Edu">&lt;karen.montefiori@Vanderbilt.Edu&gt;</a><br /><b>Subject:</b> Re: VUIT - Revised Wolfram Exhibit A</p></div></div><p class="MsoNormal"> </p><div><p class="MsoNormal">Karen,</p></div><div id="sugar_text_AppleMailSignature"><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Any changes will need to be incorporated into our document. Are you able to outline them separately so I can get them to legal to review?</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Troy</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><br /><br />Sent from my iPhone</p></div><div><p class="MsoNormal" style="margin-bottom:12pt;"><br />On Nov 20, 2015, at 3:35 PM, Montefiori, Karen E &lt;<a href="mailto:karen.montefiori@Vanderbilt.Edu">karen.montefiori@Vanderbilt.Edu</a>&gt; wrote:</p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal">Troy,</p><p class="MsoNormal"> </p><p class="MsoNormal">Attached please find a revised version of Exhibit A to the Wolfram Academic Site License Agreement.  </p><p class="MsoNormal"> </p><p class="MsoNormal">Note that we had to convert Wolfram’s PDF to make an editable document—for this reason, there may be some formatting inconsistencies, but Vanderbilt’s substantive changes are marked in tracked changes.</p><p class="MsoNormal"> </p><p class="MsoNormal">Please let me know if Wolfram is agreeable to the proposed changes.</p><p class="MsoNormal"><br />Best regards,</p><p class="MsoNormal">Karen</p><p class="MsoNormal"><span style="font-size:10pt;color:#1f497d;">---<br /><b>Karen Montefiori | Sourcing Analyst | Information Technology | Vanderbilt University</b> <br /><a href="mailto:karen.montefiori@vanderbilt.edu"><span style="color:#0563c1;">karen.montefiori@vanderbilt.edu</span></a> | phone 615.343.1630 | <a href="http://it.vanderbilt.edu/" title="Vanderbilt IT">it.vanderbilt.edu</a></span></p><p class="MsoNormal"> </p><p class="MsoNormal"> </p></div></blockquote><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal"><span style="font-size:12pt;font-family:serif;">&lt;VUIT - Wolfram Exhibit A (HL 11-19-15).DOCX&gt;</span></p></div></blockquote></blockquote><p class="MsoNormal"><span style="font-size:12pt;font-family:serif;"> </span></p><div><p class="MsoNormal" style="margin-bottom:12pt;"><span style="font-size:12pt;font-family:serif;">-- <br />Troy Schaudt<br />Wolfram Research, Inc<br />800.965.3726 ext 5588<br /><a href="mailto:troys@wolfram.com">troys@wolfram.com</a></span></p></div></blockquote><p class="MsoNormal"><span style="font-size:12pt;font-family:serif;"> </span></p><div><p class="MsoNormal" style="margin-bottom:12pt;"><span style="font-size:12pt;font-family:serif;">-- <br />Troy Schaudt<br />Wolfram Research, Inc<br />800.965.3726 ext 5588<br /><a href="mailto:troys@wolfram.com">troys@wolfram.com</a></span></p></div><p class="MsoNormal"><span style="font-size:12pt;font-family:''Times New Roman'', serif;"> </span></p></div><p class="MsoNormal" style="margin-bottom:12pt;"><span style="font-size:12pt;font-family:''Times New Roman'', serif;"> </span></p></div><p class="MsoNormal"><span style="font-size:12pt;font-family:''Times New Roman'', serif;"> </span></p></div></blockquote></div></div><br /></div></div><br /></div></div>' TEXT; $text = convert_html_to_text($text); function extract_address_from_body($string, $what=''){ $IGNORE_LIST =array ( 'ORDERS@WOLFRAM.COM' ,'ORDERS@WOLFRAM.CO.UK' ,'INFO@WOLFRAM.COM' ,'INFO@WOLFRAM.CO.UK' ,'SITE-PROGRAM@WOLFRAM.COM' ,'REGISTER@WOLFRAM.CO.UK' ,'Q-CSHELP@WOLFRAM.COM' ,'INTERACTIONS@WOLFRAM.COM' ,'INFO-FRANCE@WOLFRAM.COM' ,'INFO@WOLFRAM.CO.JP' ,'EDUCATION-PROGRAM@WOLFRAM.COM' ,'SUPPORT@WOLFRAM.COM' ,'OSW-CORR@WOLFRAM.COM' ,'INTERACTIONS@WOLFRAM.COM' ); $email_addresses = array(); $email_addrs = array(); $expr = "/" . $what . ".*\w*[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+.*/i"; $res = preg_match($expr,$string,$line); var_dump($line); if(!empty($line[0])){ $email_addrs = parseTextForEmail($line[0]); } //exclude certain addresses $email_addresses = array_filter(array_unique(array_diff($email_addrs, $IGNORE_LIST))); return $email_addresses; } function parseTextForEmail($text) { $email = array(); $text = preg_replace("/[^A-Za-z._0-9@ ]/"," ",$text); //split text in pieces based on commas semi-colons and spaces (potential separators for individual e-mails) $text = str_replace(" ",",",$text); $text = str_replace(";",",",$text); $segments = explode(",", $text); while(sizeof($segments)>0) { //load a segment into token $token = array_shift($segments); //if the string piece contains an '@' sign there is a chance that's and e-mail address if(strpos($token, "@") !== false) { $token = filter_var($token, FILTER_SANITIZE_EMAIL); if(filter_var($token, FILTER_VALIDATE_EMAIL)){ $email[] = "'" . strtolower($token) . "'"; } } } $email = array_unique($email); return $email; } $res = extract_address_from_body($text, 'To'); var_dump($res);
based on 7MGLZ
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function convert_html_to_text() in /in/s5kLE:5 Stack trace: #0 {main} thrown in /in/s5kLE on line 5
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined function convert_html_to_text() in /in/s5kLE on line 5
Process exited with code 255.