3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Image { private $url = ''; public function __construct($url) { $this->url = $url; } public function getUrl() { return $this->url; } } $img0 = new Image("https://photos.smugmug.com/Comics/Pa-comics/n-xmQS5/i-RZcDzzK/0/2100x20000/i-RZcDzzK-2100x20000.jpg"); $img1 = new Image("http://www.acq-inc.com/assets/ai/img/img_staff.gif"); $img2 = new Image("https://a.fsdn.com/sd/topics/business_64.png"); var_dump($img0->getUrl(), $img1->getUrl(), $img2->getUrl());
Output for 7.1.25 - 7.3.3
string(99) "https://photos.smugmug.com/Comics/Pa-comics/n-xmQS5/i-RZcDzzK/0/2100x20000/i-RZcDzzK-2100x20000.jpg" string(50) "http://www.acq-inc.com/assets/ai/img/img_staff.gif" string(44) "https://a.fsdn.com/sd/topics/business_64.png"