3v4l.org

run code in 300+ PHP versions simultaneously
<?php // internal include file $qfu = "SELECT * FROM my_friends WHERE (user_id = '$user_id' OR friend_id = '$user_id') AND status = '1'"; $fu = mysql_query($qfu) or die(mysql_error()); $rowfu = mysql_num_rows($fu); if ($rowfu == 0 ) { // the user has no friend echo "No friends!"; } else { while($rowf = mysql_fetch_array($fu)){ if($user_id==$rowf['user_id']){ $fid=$rowf['friend_id']; } else { $fid=$rowf['user_id']; } $querymsgs = "SELECT M.msg_id, M.uid_fk, M.message, M.created, M.privacy, U.fname, U.lname FROM messages M, tbluser U WHERE (U.id='$fid' or U.id='$user_id') and (M.uid_fk='$fid' or M.uid_fk='$fid') and (M.privacy='1' or M.privacy='2') order by M.msg_id desc LIMIT $_i, $limit "; $qmsgs = mysql_query($querymsgs) or die(mysql_error()); $row_msgs = mysql_num_rows($qmsgs); if($row_msgs==0){ continue; } else { $msgs = mysql_fetch_array($qmsgs); $msg_id=$msgs['msg_id']; $orimessage=$msgs['message']; $message=tolink(htmlentities($msgs['message'])); $time=$msgs['created']; $privacy=$msgs['privacy']; if($privacy=='0'){ $privacy='Only Me';} elseif($privacy=='2'){ $privacy='Public';} else { $privacy='Friends';} $uid=$msgs['uid_fk']; $fullname=$msgs['fname']." ".$msgs['lname']; $face=$Wall->Avatar($uid); $commentsarray=$Wall->Comments($msg_id); } ?> <script type="text/javascript"> $(document).ready(function(){$("#stexpand<?php echo $msg_id;?>").oembed("<?php echo $orimessage; ?>",{maxWidth: 400, maxHeight: 300});}); </script> <div class="stbody" id="stbody<?php echo $msg_id;?>"> <div class="stimg"> <img src="<?php echo $face;?>" class='big_face'/> </div> <div class="sttext"> <a class="stdelete" href="#" id="<?php echo $msg_id;?>" title="Delete update">X</a> <b><a href="<?php echo 'http://nitofa.com/browse-user.php?fid='.$uid;?>"><?php echo $fullname;?></a></b> <br/><?php echo $message;?> <div class="sttime"><?php time_stamp($time);?> | <a href='#commentbox<?php echo $msg_id;?>' class='commentopen' id='<?php echo $msg_id;?>' title='Comment'>Comment </a> |<!-- <a href="share.php?msg_id=<?php echo $msg_id;?>">Share</a> |--> <?php include('likeunlike.php'); ?> | <?php echo $privacy;?></div> <div id="stexpandbox"> <div id="stexpand<?php echo $msg_id;?>"></div> </div> <div class="commentcontainer" id="commentload<?php echo $msg_id;?>"> <?php include('load_comments.php'); ?> </div> <div class="commentupdate" style='display:none;' id='commentbox<?php echo $msg_id;?>'> <div class="stcommentimg"> <img src="<?php echo $face;?>" class='small_face'/> </div> <div class="stcommenttext" > <form method="post" action="comment_ajax.php"> <textarea name="comment" class="comment" maxlength="200" id="ctextarea<?php echo $msg_id;?>"></textarea> <br /> <input type="submit" value=" Comment " id="<?php echo $msg_id;?>" class="comment_button"/> </form> </div> </div> </div> </div> <?php } } if(!$_GET['next']){ $page = '2'; } else { $page = $_GET['next']+1; } ?> <a style="text-align:center;margin:0 auto;" href="wall.php?next=<?=$page?>">View More</a>

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)
8.3.70.0120.00316.75
8.3.60.0120.00318.43
8.3.50.0090.00921.89
8.3.40.0040.01118.73
8.3.30.0080.00618.97
8.3.20.0040.00420.26
8.3.10.0040.00422.08
8.3.00.0000.00822.46
8.2.190.0110.00716.75
8.2.180.0120.00316.50
8.2.170.0110.00722.96
8.2.160.0090.00620.35
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0060.01226.16
8.2.120.0070.00417.63
8.2.110.0060.00320.55
8.2.100.0030.00917.91
8.2.90.0040.00419.22
8.2.80.0030.00619.53
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0120.00018.07
8.2.40.0080.00318.16
8.2.30.0070.00318.23
8.2.20.0040.00417.91
8.2.10.0080.00017.75
8.2.00.0000.00817.88
8.1.280.0150.00325.92
8.1.270.0080.00022.37
8.1.260.0080.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00623.86
8.1.230.0070.00422.69
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0000.00917.22
8.1.190.0000.00817.50
8.1.180.0040.00418.10
8.1.170.0090.00018.59
8.1.160.0040.00422.00
8.1.150.0020.00518.63
8.1.140.0060.00317.40
8.1.130.0000.00817.87
8.1.120.0000.00717.48
8.1.110.0000.00817.42
8.1.100.0040.00417.43
8.1.90.0000.00717.44
8.1.80.0030.00317.48
8.1.70.0030.00317.41
8.1.60.0040.00417.57
8.1.50.0000.00817.64
8.1.40.0030.00717.60
8.1.30.0000.00817.63
8.1.20.0030.00617.75
8.1.10.0040.00417.67
8.1.00.0030.00617.56
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0030.00318.50
8.0.270.0030.00317.36
8.0.260.0030.00316.92
8.0.250.0030.00317.10
8.0.240.0040.00416.97
8.0.230.0000.00717.10
8.0.220.0000.00717.00
8.0.210.0070.00016.97
8.0.200.0030.00517.09
8.0.190.0050.00317.07
8.0.180.0040.00416.99
8.0.170.0000.00816.93
8.0.160.0030.00517.01
8.0.150.0000.00716.85
8.0.140.0040.00416.85
8.0.130.0000.00613.50
8.0.120.0030.00516.95
8.0.110.0080.00017.05
8.0.100.0040.00416.88
8.0.90.0040.00417.07
8.0.80.0080.00717.00
8.0.70.0030.00516.93
8.0.60.0030.00316.96
8.0.50.0040.00416.84
8.0.30.0120.00717.21
8.0.20.0130.00617.40
8.0.10.0040.00417.09
8.0.00.0100.00916.73
7.4.330.0040.00415.00
7.4.320.0000.00616.49
7.4.300.0040.00416.63
7.4.290.0000.00716.54
7.4.280.0080.00016.50
7.4.270.0030.00316.49
7.4.260.0070.00016.63
7.4.250.0030.00316.50
7.4.240.0050.00216.63
7.4.230.0030.00516.75
7.4.220.0120.00616.61
7.4.210.0070.00716.70
7.4.200.0030.00316.55
7.4.190.0030.00316.74
7.4.160.0110.00616.60
7.4.150.0150.00317.40
7.4.140.0110.00917.86
7.4.130.0060.01116.59
7.4.120.0140.00616.59
7.4.110.0110.00616.56
7.4.100.0150.00316.63
7.4.90.0060.01316.70
7.4.80.0060.01319.39
7.4.70.0100.00616.70
7.4.60.0160.00016.59
7.4.50.0020.00216.26
7.4.40.0060.00822.77
7.4.30.0100.00716.64
7.4.00.0080.00814.79
7.3.330.0030.00313.12
7.3.320.0060.00013.18
7.3.310.0070.00016.52
7.3.300.0040.00416.42
7.3.290.0110.00816.34
7.3.280.0100.00816.38
7.3.270.0110.00817.40
7.3.260.0070.01016.45
7.3.250.0130.00816.60
7.3.240.0130.00316.33
7.3.230.0110.00716.43
7.3.210.0070.01016.38
7.3.200.0090.00919.39
7.3.190.0030.02016.43
7.3.180.0120.00616.52
7.3.170.0080.01116.69
7.3.160.0070.01116.47
7.3.120.0000.01715.08
7.2.330.0030.01416.41
7.2.320.0160.00616.86
7.2.310.0140.00316.47
7.2.300.0100.00716.46
7.2.290.0120.00916.60
7.2.60.0080.00316.87
7.2.00.0040.01219.33
7.1.200.0040.00415.75
7.1.100.0090.00318.05
7.1.70.0110.00316.84
7.1.60.0140.01019.82
7.1.50.0030.02116.94
7.1.00.0000.08022.28
7.0.200.0040.00416.69
7.0.140.0100.06722.15
7.0.100.0000.07320.05
7.0.90.0130.05720.00
7.0.80.0200.04020.18
7.0.70.0230.04719.99
7.0.60.0130.06320.13
7.0.50.0100.08020.37
7.0.40.0070.05720.05
7.0.30.0100.08320.13
7.0.20.0130.07720.14
7.0.10.0100.07320.09
7.0.00.0000.07320.14
5.6.280.0030.07321.13
5.6.250.0030.05720.59
5.6.240.0030.06320.66
5.6.230.0000.08720.59
5.6.220.0230.06720.67
5.6.210.0070.03720.77
5.6.200.0070.05021.10
5.6.190.0030.04321.12
5.6.180.0170.03721.15
5.6.170.0030.08021.10
5.6.160.0100.08020.97
5.6.150.0000.08321.06
5.6.140.0100.10021.04
5.6.130.0070.08020.97
5.6.120.0130.06721.19
5.6.110.0030.06721.03
5.6.100.0030.07721.02
5.6.90.0070.04320.95
5.6.80.0000.06020.36
5.6.70.0070.06020.35
5.6.60.0030.06720.47
5.6.50.0130.06720.58
5.6.40.0100.06320.42
5.6.30.0070.07320.30
5.6.20.0000.07320.32
5.6.10.0100.06720.30
5.6.00.0030.04720.37
5.5.380.0130.07320.37
5.5.370.0100.06720.50
5.5.360.0070.04020.35
5.5.350.0070.03720.35
5.5.340.0000.04320.78
5.5.330.0030.06720.88
5.5.320.0030.05720.82
5.5.310.0070.05320.82
5.5.300.0030.04320.83
5.5.290.0030.04720.89
5.5.280.0100.06020.88
5.5.270.0130.03720.65
5.5.260.0030.07020.61
5.5.250.0070.04020.71
5.5.240.0030.06720.24
5.5.230.0070.06320.04
5.5.220.0000.03720.18
5.5.210.0100.05020.32
5.5.200.0030.07720.02
5.5.190.0030.08020.27
5.5.180.0030.09020.27
5.5.160.0130.07020.14
5.5.150.0030.06720.14
5.5.140.0030.04320.28
5.5.130.0100.06320.29
5.5.120.0100.04720.24
5.5.110.0100.05720.27
5.5.100.0000.05020.09
5.5.90.0100.06020.18
5.5.80.0000.08719.99
5.5.70.0100.05320.17
5.5.60.0030.04020.18
5.5.50.0100.03320.16
5.5.40.0070.04720.04
5.5.30.0070.04320.13
5.5.20.0100.05720.09
5.5.10.0000.07720.04
5.5.00.0070.08320.07
5.4.450.0000.08019.55
5.4.440.0070.04719.35
5.4.430.0100.07319.38
5.4.420.0170.07019.22
5.4.410.0030.08019.01
5.4.400.0070.03719.05
5.4.390.0100.07019.04
5.4.380.0070.05319.14
5.4.370.0030.05719.12
5.4.360.0000.07718.96
5.4.350.0000.07719.03
5.4.340.0070.03719.10
5.4.320.0030.08018.96
5.4.310.0100.07718.99
5.4.300.0070.03318.78
5.4.290.0030.07719.02
5.4.280.0070.05319.04
5.4.270.0070.04019.22
5.4.260.0030.04019.14
5.4.250.0130.05318.78
5.4.240.0070.06018.94
5.4.230.0230.04318.80
5.4.220.0030.05018.96
5.4.210.0070.07319.02
5.4.200.0030.07318.79
5.4.190.0070.07318.95
5.4.180.0000.04319.04
5.4.170.0070.07018.93
5.4.160.0170.05719.00
5.4.150.0130.07019.00
5.4.140.0000.03716.28
5.4.130.0070.05316.36
5.4.120.0000.06716.25
5.4.110.0030.07316.30
5.4.100.0130.05716.38
5.4.90.0070.03316.21
5.4.80.0030.07316.22
5.4.70.0070.03716.29
5.4.60.0100.04716.38
5.4.50.0000.06716.41
5.4.40.0070.06716.43
5.4.30.0070.06716.24
5.4.20.0000.03716.34
5.4.10.0100.06316.30
5.4.00.0000.05015.58
5.3.290.0000.07314.55
5.3.280.0100.05714.47
5.3.270.0030.03714.61
5.3.260.0100.07314.63
5.3.250.0130.06314.60
5.3.240.0000.05314.58
5.3.230.0000.03314.61
5.3.220.0070.05014.58
5.3.210.0100.03714.43
5.3.200.0070.07314.45
5.3.190.0030.06014.55
5.3.180.0100.07314.53
5.3.170.0100.06314.59
5.3.160.0030.04314.57
5.3.150.0070.06714.59
5.3.140.0070.06014.55
5.3.130.0070.06314.53
5.3.120.0170.07014.43
5.3.110.0030.04714.56
5.3.100.0000.04014.04
5.3.90.0030.05014.00
5.3.80.0070.05713.92
5.3.70.0170.04714.02
5.3.60.0130.06713.79
5.3.50.0070.06013.82
5.3.40.0030.03713.91
5.3.30.0070.05313.79
5.3.20.0100.05313.57
5.3.10.0070.05713.65
5.3.00.0030.07713.64
5.2.170.0070.03711.54
5.2.160.0030.05311.54
5.2.150.0030.06011.54
5.2.140.0030.06011.54
5.2.130.0030.05011.54
5.2.120.0030.06011.54
5.2.110.0100.05711.54
5.2.100.0030.05711.54
5.2.90.0070.06311.54
5.2.80.0070.05711.54
5.2.70.0000.03711.54
5.2.60.0070.05711.54
5.2.50.0000.06711.54
5.2.40.0030.02711.54
5.2.30.0000.07011.54
5.2.20.0070.05311.54
5.2.10.0070.05011.54
5.2.00.0030.03011.54
5.1.60.0070.04711.54
5.1.50.0030.04011.54
5.1.40.0100.03011.54
5.1.30.0070.04711.54
5.1.20.0070.05311.54
5.1.10.0000.05311.54
5.1.00.0070.02011.54
5.0.50.0030.02311.54
5.0.40.0000.02011.54
5.0.30.0030.03011.54
5.0.20.0000.03711.54
5.0.10.0000.04711.54
5.0.00.0130.05311.54
4.4.90.0000.03711.54
4.4.80.0000.01711.54
4.4.70.0030.03711.54
4.4.60.0000.03711.54
4.4.50.0030.01311.54
4.4.40.0000.05011.54
4.4.30.0030.03711.54
4.4.20.0000.01711.54
4.4.10.0000.02311.54
4.4.00.0030.04711.54
4.3.110.0000.01711.54
4.3.100.0000.02011.54
4.3.90.0000.02311.54
4.3.80.0000.04011.54
4.3.70.0000.02011.54
4.3.60.0000.02011.54
4.3.50.0000.04011.54
4.3.40.0000.02311.54
4.3.30.0000.03011.54
4.3.20.0000.02311.54
4.3.10.0000.01711.54
4.3.00.0000.02311.54

preferences:
47.29 ms | 401 KiB | 5 Q