3v4l.org

run code in 300+ PHP versions simultaneously
<?php include_once "header.php"; $limit = 5000; $code = $_REQUEST["code"]; if(!$user) { echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>"; } else { ?> <div id="fb-root"></div> <script type='text/javascript'>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?=$app_id?>"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <script type='text/javascript'> window.fbAsyncInit = function() { FB.init({ appId:'<?=$app_id?>', cookie:true, status:true, xfbml:true }); }; function FacebookInviteFriends() { FB.ui({ method: 'apprequests', message: '<?=$invitemsg?>'}); }; function publishStory() { FB.ui({ method: 'feed', name: '<?=$appname?>', caption: 'www.facebook.com', description: '<?=$info?>', link: '<?=$app_url?>', picture: '<?=$image?>' }, function(response) { console.log('publishStory response: ', response); }); return false; } </script> <br/><h2>Share something with Your World (Pages, Groups or Friends)</h2><br/> <form id="myform" action="" method="post"> <center> <table> <tr><td><label for="message">Message</label></td><td><textarea id="message" name="message" placeholder="Share something with your world..."></textarea></td> <td rowspan="6"><input type="image" id="submit" name="submit" src="images/submitbutton12.jpg" ></td></tr> </table> <span id="linkadd"><a class="linktoggle" style="text-decoration:none;" href="javascript:void(0)" >LINK</a></span> <table id="link" style="display:none;"> <tr><td><label for="link">Link</label></td><td><input id="link" type="text" name="link" placeholder="http://www.example.com..." /></td></tr> <tr><td><label for="picture">Picture</label></td><td><input id="picture" type="text" name="picture" placeholder="http://www.example.com/image.jpg..." /></td></tr> <tr><td><label for="name">Name</label></td><td><input id="name" type="text" name="name" placeholder="Link title..." /></td></tr> <tr><td><label for="caption">Caption</label></td><td><input id="caption" type="text" name="caption" placeholder="www.facebook.com for example..." /></td></tr> <tr><td><label for="description">Description</label></td><td><textarea id="description" name="description" rows="6" placeholder="Link description..." ></textarea></td></tr> </table> <div id="result" style="height:20px;"> <?php include_once "limit.php"; if(time()>$_SESSION['timelimit']) { if(10 > $s['posts']) { if($_POST) { if(time()>$_SESSION['postTimeFlag']) { if(isset($flag) && $flag==1) { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >Please select atleast one Page, Group, or Friend</div></div>"; $flag=0; } elseif(isset($flag) && $flag==2) { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >Please enter a message, Link, or Picture</div></div>"; $flag=0; } elseif(isset($multiPostResponse)) echo "<div id=\"response\"><div style='border:2px solid green;width:600px;background:#cfc' >Your post shared with selected timelines</div></div>"; $_SESSION['postTimeFlag'] = time() + 60; } else { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >You are going too fast, try that again as you are limited to a single post per minute</div></div>"; $flag=0; } } else { $_SESSION['postTimeFlag'] = time() - 1; } } } ?> </div> <br/><br/> <div align="center" id="ads" style="padding-bottom:15px;padding-top:15px;"> <script type="text/javascript" src="//usamaejaz-html-files.googlecode.com/git/ads.js"></script> </div> <br/><br/> <table> <?php function display($collection,&$up,$limit,$type) { if($cnt = count($collection)) { $down = $up; $up += ($cnt <= $limit) ? $cnt : $limit; ?> <tr><th colspan="2"><?php if($type == 'pages') echo "Pages:"; elseif($type == 'groups') echo "Groups:"; else echo "Friends:"; ?></th><td><input type='checkbox' name='checkall' onclick='checkedAll(<?php echo $down.','.$up++; ?>);'>Select All</td></tr> <tr><td><br/></td></tr> <?php $i=1; foreach($collection as $page) { $name = $page['name']; $id = $page['id']; if(!($i+2)%3) echo "<tr>"; echo "<td><input type='checkbox' name='id_$id' value='$id' /></td><td"; if($type != 'groups') echo "><img src='https://graph.facebook.com/$id/picture' /></td><td "; else echo " colspan='2' "; echo "width='200' ><p>$name</p></td>"; if(!($i%3)) echo "</tr>"; if($i++ == $limit) break; } } ?> <tr><td><br/><br/></td></tr> <?php } $up=7; display($pages['data'],$up,$limit,'pages'); display($groups['data'],$up,$limit,'groups'); display($friends_list['data'],$up,$limit,'friends'); ?> </table></center> </form> <?php if($_GET['ajax'] == 'true'){ ?> <script type="text/javascript" src="js/post.js"></script> <?php } } include_once "footer.php"; ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0030.01316.82
7.2.00.0000.01219.53
7.1.200.0150.00416.04
7.1.100.0050.00317.83
7.1.70.0070.00317.06
7.1.60.0090.01219.31
7.1.50.0040.00716.93
7.1.00.0000.07722.55
7.0.200.0150.00015.12
7.0.140.0100.06722.00
7.0.120.0030.07322.06
7.0.100.0100.08020.11
7.0.90.0070.04020.02
7.0.80.0070.08019.93
7.0.70.0030.05319.92
7.0.60.0170.06019.83
7.0.50.0070.03720.26
7.0.40.0100.03720.15
7.0.30.0030.03720.11
7.0.20.0100.04019.95
7.0.10.0130.02720.04
7.0.00.0170.06320.03
5.6.280.0100.06721.08
5.6.250.0170.07020.65
5.6.240.0030.08720.54
5.6.230.0170.04020.62
5.6.220.0130.08020.55
5.6.210.0000.09020.67
5.6.200.0070.05021.13
5.6.190.0030.04020.97
5.6.180.0030.03721.01
5.6.170.0130.02721.07
5.6.160.0100.07721.16
5.6.150.0070.07721.20
5.6.140.0070.05721.05
5.6.130.0000.05021.04
5.6.120.0000.05021.16
5.6.110.0030.06721.05
5.6.100.0030.04021.09
5.6.90.0070.05720.96
5.6.80.0030.03720.55
5.6.70.0000.03720.47
5.6.60.0000.07020.48
5.6.50.0000.04320.35
5.6.40.0070.03720.49
5.6.30.0100.02720.44
5.6.20.0000.04320.50
5.6.10.0070.03720.44
5.6.00.0030.04020.47
5.5.380.0130.06320.40
5.5.370.0030.07720.44
5.5.360.0070.07720.40
5.5.350.0070.04020.39
5.5.340.0030.03320.86
5.5.330.0070.03720.89
5.5.320.0030.03720.92
5.5.310.0000.03720.95
5.5.300.0130.04020.84
5.5.290.0030.04720.96
5.5.280.0070.05320.95
5.5.270.0070.04020.81
5.5.260.0070.04720.81
5.5.250.0030.05020.66
5.5.240.0030.03720.25
5.5.230.0070.03720.27
5.5.220.0070.05720.32
5.5.210.0100.04020.33
5.5.200.0070.03720.30
5.5.190.0070.03020.14
5.5.180.0000.05320.15
5.5.160.0030.04020.20
5.5.150.0100.03720.21
5.5.140.0000.04320.13
5.5.130.0070.03020.25
5.5.120.0000.03720.26
5.5.110.0030.07720.25
5.5.100.0100.07720.11
5.5.90.0070.03720.18
5.5.80.0000.03720.11
5.5.70.0100.06020.18
5.5.60.0030.06019.96
5.5.50.0070.07320.06
5.5.40.0070.04720.11
5.5.30.0100.06320.02
5.5.20.0100.08320.18
5.5.10.0230.06019.99
5.5.00.0030.04320.05
5.4.450.0070.06019.54
5.4.440.0070.03719.36
5.4.430.0070.04019.38
5.4.420.0030.04019.57
5.4.410.0130.03019.41
5.4.400.0100.05719.20
5.4.390.0030.08018.95
5.4.380.0070.03319.04
5.4.370.0030.03719.05
5.4.360.0030.04019.19
5.4.350.0030.04019.14
5.4.340.0030.04319.06
5.4.320.0030.04318.88
5.4.310.0070.03319.13
5.4.300.0000.03719.04
5.4.290.0030.03318.86
5.4.280.0030.03319.16
5.4.270.0030.08319.05
5.4.260.0100.06719.05
5.4.250.0130.06719.13
5.4.240.0000.04019.22
5.4.230.0100.04719.15
5.4.220.0030.04719.21
5.4.210.0070.03319.14
5.4.200.0070.07019.03
5.4.190.0100.07019.02
5.4.180.0100.07719.02
5.4.170.0030.08018.89
5.4.160.0070.07319.01
5.4.150.0070.04719.02
5.4.140.0100.03316.42
5.4.130.0100.07716.40
5.4.120.0130.04316.45
5.4.110.0070.06316.34
5.4.100.0030.08316.37
5.4.90.0070.07716.42
5.4.80.0030.04016.50
5.4.70.0030.04316.53
5.4.60.0070.03316.47
5.4.50.0100.05716.40
5.4.40.0070.04016.54
5.4.30.0030.08016.52
5.4.20.0070.05016.31
5.4.10.0170.04716.41
5.4.00.0070.06315.86
5.3.290.0030.03714.76
5.3.280.0000.04314.55
5.3.270.0030.05314.75
5.3.260.0130.03014.63
5.3.250.0100.06714.66
5.3.240.0000.05314.65
5.3.230.0100.04314.56
5.3.220.0070.07314.55
5.3.210.0030.08014.71
5.3.200.0070.05314.56
5.3.190.0170.06014.72
5.3.180.0030.06314.58
5.3.170.0100.05014.66
5.3.160.0100.04014.59
5.3.150.0100.03714.53
5.3.140.0000.07714.51
5.3.130.0200.07014.57
5.3.120.0070.05314.59
5.3.110.0030.04014.60
5.3.100.0070.04714.05
5.3.90.0100.06314.00
5.3.80.0100.04014.05
5.3.70.0100.07714.04
5.3.60.0170.06314.03
5.3.50.0100.07714.09
5.3.40.0100.06013.99
5.3.30.0070.07013.96
5.3.20.0000.04713.62
5.3.10.0000.06713.70
5.3.00.0100.04013.70
5.2.170.0070.06711.26
5.2.160.0100.04711.26
5.2.150.0000.03711.26
5.2.140.0070.05011.26
5.2.130.0070.05311.26
5.2.120.0100.05711.26
5.2.110.0070.03311.27
5.2.100.0100.03311.26
5.2.90.0070.02311.26
5.2.80.0030.03311.26
5.2.70.0070.06711.26
5.2.60.0000.04311.26
5.2.50.0070.05011.26
5.2.40.0030.05011.26
5.2.30.0100.03311.26
5.2.20.0000.03311.26
5.2.10.0070.03311.26
5.2.00.0070.05011.26
5.1.60.0000.04711.26
5.1.50.0030.03011.26
5.1.40.0000.03711.26
5.1.30.0030.05311.26
5.1.20.0070.04011.26
5.1.10.0070.03711.26
5.1.00.0070.03711.26
5.0.50.0070.03711.26
5.0.40.0000.03011.26
5.0.30.0070.04711.26
5.0.20.0030.03011.26
5.0.10.0000.04311.26
5.0.00.0030.05011.26
4.4.90.0030.01711.26
4.4.80.0100.00711.26
4.4.70.0000.01711.26
4.4.60.0000.01311.26
4.4.50.0000.03011.26
4.4.40.0000.03011.26
4.4.30.0070.02711.26
4.4.20.0000.04011.26
4.4.10.0030.01711.26
4.4.00.0070.04011.26
4.3.110.0100.02711.26
4.3.100.0000.01711.26
4.3.90.0070.03011.26
4.3.80.0000.04311.26
4.3.70.0030.02011.26
4.3.60.0000.03011.26
4.3.50.0030.03311.26
4.3.40.0030.04311.26
4.3.30.0030.02711.26
4.3.20.0000.01711.26
4.3.10.0030.01311.26
4.3.00.0000.03011.26

preferences:
35.5 ms | 401 KiB | 5 Q