fork download
  1. <?php
  2. $opa = array();
  3. preg_match('/[^\\\\]*\.(\w+)$/', "Arquivo/tal/file.jpg", $opa);
  4. print_r($opa);
  5. ?>
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Arquivo/tal/file.jpg
    [1] => jpg
)