3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parsedURL = parse_url('https://static01.nyt.com/images/2018/08/28/us/28vote_print/28vote_xp-articleLarge.jpg?quality=75&auto=webp&disable=upscale'); $pathinfo = pathinfo($parsedURL['path']); $filename = $pathinfo['filename']; $extension = $pathinfo['extension']; var_dump($filename, $extension);
Output for 7.1.0 - 7.1.21, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
string(22) "28vote_xp-articleLarge" string(3) "jpg"

preferences:
185.48 ms | 480 KiB | 5 Q