3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Get the Audiomack URL if (!function_exists('samk_audio_audiomack')) { function samk_audio_audiomack($url, $width = '100%', $height = 250) { if($url!='') { $buff = ''; $buff .= "\n<!-- audiomack | {$plugin_data['name']} | {$plugin_data['url']} -->\n"; $embed_src = $url; $embed_ver_prefix = 'embed4'; // Check if the embedded source is song or album if(stripos($embed_src, '/song/') !== false) { //it is a song $embed_src = str_replace('/song/', "/$embed_ver_prefix-large/", $embed_src); }else{ //it is an album $height = 352; $embed_src = str_replace('/album/', "/$embed_ver_prefix-album/", $embed_src); } $height_str = "height='$height'"; $embed_code = "<iframe src='$embed_src' scrolling='no' width='$width' $height_str scrollbars='no' frameborder='0'></iframe>\n"; $buff .= "<div class='audiomack_player_container'>\n"; $buff .= $embed_code; $buff .= "</div> <!-- /audiomack_player_container -->\n"; $buff .= "\n<!-- /audiomack | {$plugin_data['name']} | {$plugin_data['url']} -->\n"; return $buff; } } } ?> <?php $audiomack_audio = 'www.example.com'; if($audiomack_audio!='') { $audiomack_audio_code = samk_audio_audiomack($audiomack_audio,'100%',250); ?> <div class="audio-container sermon-tabs" id="audiomack_audio"> <?php echo $audiomack_audio_code; ?> </div> <?php } ?>

preferences:
25.1 ms | 406 KiB | 5 Q