Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$url = 'https://vk.com/albums515454694?z=photo515454694_457240380%2Fphotos515454694';
$url = preg_replace("(^https?://)", "", $url);
preg_match("/(photo|video|wall)-([\d]+_[\d]+)/i", $url, $attachment);
print_r($attachment);