3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( array("tid"=>192, "Xname"=>"System", "descr"=>"TICKET FOR ORGANIZATION: System | ID: 0","severity"=>4,"roa_id"=>0,"xid"=>0), array("tid"=>5395, "Xname"=>"System", "descr"=>"New Customer - Sky Scape","severity"=>1,"roa_id"=>3,"xid"=>0), array("tid"=>5399, "Xname"=>"System", "descr"=>"New Customer - ","severity"=>1,"roa_id"=>0,"xid"=>0), array("tid"=>6269, "Xname"=>"dishant.sciencelogic.local", "descr"=>"CRITICAL MESSAGE FOR ALLY","severity"=>4,"roa_id"=>10,"xid"=>0) ); //print_r($data); foreach ($data as $key=>$val){ $sql = "SELECT id, notes FROM master_biz.ticket_notes WHERE notes REGEXP '.*SOW Request:.*' AND tid = " . $val['tid'] . " ORDER BY id DESC LIMIT 10"; } $notes = "<strong>SOW Request: Needed by 3/14/2016</strong><br /><table><tbody><tr><td>Request Type</td><td>Other</td></tr><tr><td>Request Date</td><td>3/2/2016</td></tr><tr><td>Needed By</td><td>3/14/2016</td></tr><tr><td>Customer Point of Contact (Requestor)</td><td>Wendy Wooley</td></tr></tbody></table>"; $regex = "/Needed\s+By.*(([1-9]|0[1-9]|1[012])\/([1-9]|[12][0-9]|3[01])\/20\d\d).*Customer Point of Contact/"; $reg_match = preg_match($regex,$notes,$matches); print_r($mateches);
based on m8X84
Output for 5.5.0 - 7.3.0rc4
Notice: Undefined variable: mateches in /in/AFdco on line 20