3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $html = <<<EOL<script type="text/javascript" src="http://dogtrickstutorial.com/ova.jwplayer.5x/dist/js/ova-examples.js"></script><script type="text/javascript" src="http://dogtrickstutorial.com/ova.jwplayer.5x/dist/js/jwplayer.js"></script><style type="text/css"><!-- @import url(http://dogtrickstutorial.com/ova.jwplayer.5x/dist/css/global.css);--></style><h2>Tap-View VAST/VPAID Test Page</h2><p class="example"></p><div id="tag_container" style="display: none;width:800px;padding-left:1px;border-style:solid;border-color:#EAE6E6;border-width:3px;font-family:helvetica,arial,sans-serif;padding-left:0px;"> <form name="tagform" style="width:800px;"> <input type="text" id="adtag" style="width:720px;" value="Enter your ad tag here" defaultValue="Enter your ad tag here" onClick="javascript:clearText(this);"/> <input type="button" value="Submit" class="btn" style="color:#050;font:bold 84% 'trebuchet ms',helvetica,arial,sans-serif;background-color:#fed;border: 1px solid;border-color: #696 #363 #363 #696;filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa');" onClick="javascript:configureOVA();"> </form></div><div style="display: none;" id="example_tag" style="width:648px;padding-left:1px;font-family:helvetica,arial,sans-serif;padding-left:1px;font-size:11px;padding-top:5px;padding-bottom:10px;"> <u>Examples:</u><br/> &nbsp;&nbsp;Linear Stream: http://ad3.liverail.com/?LR_PUBLISHER_ID=1331&LR_CAMPAIGN_ID=229&LR_SCHEMA=vast2<br/> &nbsp;&nbsp;Linear VPAID: http://search.spotxchange.com/vast/2.00/74856?VPAID=1&content_page_url=mypage&cb=__random-number__<br/></div><div id="player_row" style="height:260px;width:800px;"> <div style="float:left;"> <div id="container" style="width:320px;height:254px;float:left;background:#F1F1F1;padding-left:1px;font-family:helvetica,arial,sans serif;padding-left:1px;"> </div> </div> <div id="companion" style="width:300px;height:250px;float:left;margin-left:5px;background:#F1F1F1;border-style:solid;border-color:#EAE6E6;border-width:2px;"> </div></div><br/><div><form id="playerSizing" style="display: none;">height: <input type="text" name="height" size="4" value="254"/>&nbsp;width: <input type="text" name="width" size="4" value="320"/>&nbsp;<button type="button" onClick="resizePlayer();">Resize Player</button><form></div><script type="text/javascript">var JW_PLAYER_CONTAINER_ID = "container";function resizePlayer(form) { var width = document.forms["playerSizing"]["width"].value; var height = document.forms["playerSizing"]["height"].value; $("#player_row").css("width", width + "px"); $("#player_row").css("height", height + "px"); jwplayer(JW_PLAYER_CONTAINER_ID).resize(width, height); debug("Have resized the player to " + width + "x" + height);}function clearText(field){ if (field.defaultValue == field.value) field.value = ''; return true;}function getAdTag() { return document.tagform.adtag.value;}function formatConfig(config) { var result = "<br/>/*<br/>"; result += "&nbsp;* This OVA configuration plays a pre-roll and has a<br/>"; result += "&nbsp;* single 300x250 companion declared.<br/>"; result += "&nbsp;*/<br/><br/>"; config = config.replace(/\\n/gi,"<br/>"); config = config.replace(/ /gi,"&nbsp;"); return result + config + "<br/>";}function configureOVA() { var adTag = "this-is-my-ad-tag"; newConfig = '{\\n'; newConfig += ' "debug": { "levels": "fatal,config,vast_template,vpaid,http_calls,playlist,api,display_events,segment_formation" },\\n'; newConfig += ' "autoPlay": true,\\n'; newConfig += ' "ads": {\\n'; newConfig += ' "companions": {\\n'; newConfig += ' "regions": [\\n'; newConfig += ' { "id":"companion", "width":300, "height":250 }\\n'; newConfig += ' ]\\n'; newConfig += ' },\\n'; newConfig += ' "vpaid": {\\n'; newConfig += ' "enableLinearScaling": false\\n'; newConfig += ' },\\n'; newConfig += ' "schedule": [\\n'; newConfig += ' {\\n'; newConfig += ' "position": "pre-roll",\\n'; newConfig += ' "tag": "' + getAdTag() + '"\\n'; newConfig += ' }\\n'; newConfig += ' ]\\n'; newConfig += ' }\\n'; newConfig += '}\\n'; jwplayer(JW_PLAYER_CONTAINER_ID).getPlugin("ova").scheduleAds(null, newConfig); $("div.codebox").html(formatConfig(newConfig)); return true;}jwplayer(JW_PLAYER_CONTAINER_ID).setup({ flashplayer: OVA_PLAYER_3, playlist: [ { file: "http://cdn-static.liverail.com/swf/ui/uivideo.mp4", duration: 10 } ], "controlbar.position": "bottom", plugins: { "http://dogtrickstutorial.com/ova.jwplayer.5x/dist/swf/ova-jw.js": { "ads": { "companions": [ { "id":"companion", "width":300, "height":250 } ], "schedule": [ { "position": "pre-roll", "tag": ""EOL;return $html;
Output for 5.4.0 - 5.4.38
Parse error: syntax error, unexpected '<<' (T_SL) in /in/mcpcM on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_SL in /in/mcpcM on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_SL in /in/mcpcM on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/mcpcM on line 2
Process exited with code 255.