3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id =1; $SocialHandle = "Facebook,Twitter,LinkIn"; $SocialHandle = explode(",", $SocialHandle); $SociaUrl = "Url1,Url2,Url3"; $SociaUrl = explode(",", $SociaUrl); $sql = "INSERT INTO `social_table`(`id`, `social_handle`, `handle_url`) VALUES"; for ($i = 0; $i < count($SocialHandle); $i++) { $sql .= "($id, '$SocialHandle[$i]','$SociaUrl[$i]'),"; } $sql = rtrim($sql, ','); echo $sql;
Output for git.master, git.master_jit, rfc.property-hooks
INSERT INTO `social_table`(`id`, `social_handle`, `handle_url`) VALUES(1, 'Facebook','Url1'),(1, 'Twitter','Url2'),(1, 'LinkIn','Url3')

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:
27.67 ms | 405 KiB | 5 Q