3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace FF_FeedManager; interface DisplayTypes { // Display Types const SD = 'SD'; const HD = 'HD'; const FID = 'FID'; const UHD = 'UHD'; // 4x or Ultra HD } interface DeliveryTypes { // Delivery Types const HLS = 'HLS'; const SS = 'SS'; const DASH = 'DASH'; const F50512 = '50512'; const F50522 = '50522'; const F60181 = '60181'; const F60171 = '60171'; } interface FeedManager extends DisplayTypes,DeliveryTypes { /** * Get the URL for the given FeedType * @param $id Kaltura ID * @param $display_type HD,SD,etc * @param $delivery_type HLS,SS,etc *. * @return string */ public function GetFeed($id, DisplayTypes $displayType, DeliveryTypes $deliveryType); /** * Get all of the feeds * @param $id Kaltura ID * * @return array */ public function GetAllFeeds($id); } class DrupalFeedManager implements FeedManager { // No need for a constructor for the DB connector public function GetFeed($id, DisplayTypes $displayType, DeliveryTypes $deliveryType) { $url = db_result( db_query( "SELECT url FROM azure_endpoints WHERE kid LIKE '%s' AND display_type LIKE '%s' AND delivery_type LIKE '%s'", $id, $displayType, $deliverType ) ); return isset($url) ? $url : FALSE; } public function GetAllFeeds($id) { $feeds_result = db_query( "SELECT display_type, delivery_type, url FROM azure_endpoints WHERE kid LIKE '%s'", $id ); $feeds_array = array(); while ($feed = db_fetch_array($feeds_result)) { $feeds_array[$feed['display_type']][$feed['delivery_type']] = $feed['url']; } return $feeds_array; } } print DisplayTypes::HD; print DeliveryTypes::F50512; ?>
Output for git.master, git.master_jit, rfc.property-hooks
HD50512

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.66 ms | 401 KiB | 8 Q