3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://player.vimeo.com/video/322332324?byline=0'; // Get the path from the URL $path = parse_url($url, PHP_URL_PATH); // Explode the path on / to get the different fragments $fragments = explode('/', $path); // Now simply take the last part of the fragemnts $numbers = end($fragments); echo $numbers;

preferences:
39.41 ms | 406 KiB | 5 Q