3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined variable $mateches in /in/AFdco on line 20
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined variable $mateches in /in/AFdco on line 20
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: mateches in /in/AFdco on line 20
Output for 7.3.32 - 7.3.33

preferences:
221.4 ms | 401 KiB | 243 Q