3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test1]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2018-12-14T00:00:00Z' ], ], [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test2]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2018-10-14T00:00:00Z' ], ], [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test3]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2019-10-14T00:00:00Z' ], ], ]; foreach($arr as $game){ $timeleft = strtotime($game['attributes']['release-date'])-time(); if($timeleft>0) Echo floor($timeleft/86400) ." days left to ".$game['attributes']['name'] ." \n"; }
Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
58 days left to Battlefield V [test1] 362 days left to Battlefield V [test3]

preferences:
70.65 ms | 402 KiB | 42 Q