3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*自己的選項*/ $url[] = array('url' => 'http://tw.yahoo.com','option' => 'yahoo.tw'); $url[] = array('url' => 'http://cn.yahoo.com','option' => 'yahoo.cn'); ?> <html> <head> <script> function chglink() {document.getElementById("link").innerHTML = document.getElementById("addr").value;} function chgFrame() {document.getElementById("iframe1").src = document.getElementById("link").innerHTML;} </script> </head> <body> 自己的選項 <?php print_r($url);?> <hr> <table border="1"> <tr><td>有select表單</td></tr> <tr><td>php在table內<select id="addr" onchange="chglink();"> <?php foreach($url as $k => $v) echo '<option value="'.$v["url"].'">'.$v["option"].'</option>'; ?> </select></td></tr> <tr><td>會顯示url(<a id="link" href="#" onclick="chgFrame();"></a>),請點我控制iframe</td></tr> <tr><td><iframe id="iframe1" src="<?php echo $url[0]["url"];?>" width="600px" height="400px"></td></tr> </table> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<html> <head> <script> function chglink() {document.getElementById("link").innerHTML = document.getElementById("addr").value;} function chgFrame() {document.getElementById("iframe1").src = document.getElementById("link").innerHTML;} </script> </head> <body> 自己的選項 Array ( [0] => Array ( [url] => http://tw.yahoo.com [option] => yahoo.tw ) [1] => Array ( [url] => http://cn.yahoo.com [option] => yahoo.cn ) ) <hr> <table border="1"> <tr><td>有select表單</td></tr> <tr><td>php在table內<select id="addr" onchange="chglink();"> <option value="http://tw.yahoo.com">yahoo.tw</option><option value="http://cn.yahoo.com">yahoo.cn</option></select></td></tr> <tr><td>會顯示url(<a id="link" href="#" onclick="chgFrame();"></a>),請點我控制iframe</td></tr> <tr><td><iframe id="iframe1" src="http://tw.yahoo.com" width="600px" height="400px"></td></tr> </table> </body> </html>

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:
36.72 ms | 403 KiB | 8 Q