3v4l.org

run code in 300+ PHP versions simultaneously
<?php //include_once "fbconfig.php"; if($user){ echo "<!-- user logged in -->"; if($_POST) { include_once "limit.php"; if($s['posts'] !== 10) { if(time()>$_SESSION['timelimit']) { if(time()>$_SESSION['postTimeFlag']) { if($_POST['message'] || $_POST['link'] || $_POST['picture']) { $body = array( 'message' => $_POST['message'], 'link' => $_POST['link'], 'picture' => $_POST['picture'], 'name' => $_POST['name'], 'caption' => $_POST['caption'], 'description' => $_POST['description'], ); $batchPost=array(); $i=1; $flag=1; foreach($_POST as $key => $value) { if(strpos($key,"id_") === 0) { $batchPost[] = array('method' => 'POST', 'relative_url' => "/$value/feed", 'body' => http_build_query($body)); if($i++ == 50) { try{ $multiPostResponse = $facebook->api('?batch='.urlencode(json_encode($batchPost)), 'POST'); }catch(FacebookApiException $e){ error_log($e); echo("Batch Post Failed"); } $flag=0; unset($batchPost); $i=1; } } } if(isset($batchPost) && count($batchPost) > 0 ) { try{ $multiPostResponse = $facebook->api('?batch='.urlencode(json_encode($batchPost)), 'POST'); }catch(FacebookApiException $e){ error_log($e); echo("Batch Post Failed"); } $flag=0; } } else { $flag=2; } 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>"; } } else { echo "error 2"; } } else { echo "error 3"; } } } else { echo "Not logged in"; } ?>

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.4.00.0040.01514.87
7.3.120.0030.01314.86
7.3.110.0060.01214.87
7.3.100.0090.00614.74
7.3.90.0120.00614.98
7.3.80.0120.00314.50
7.3.70.0140.00314.44
7.3.60.0060.00914.47
7.3.50.0070.01014.86
7.3.40.0070.00714.66
7.3.30.0040.00814.65
7.3.20.0090.00616.45
7.3.10.0030.01016.50
7.3.00.0060.00616.53
7.2.250.0030.01415.13
7.2.240.0040.01415.00
7.2.230.0000.01515.11
7.2.220.0060.00614.91
7.2.210.0000.01115.08
7.2.200.0070.00314.88
7.2.190.0030.01315.02
7.2.180.0060.00314.78
7.2.170.0070.00714.86
7.2.130.0030.01216.54
7.2.120.0030.01416.77
7.2.110.0000.01116.70
7.2.100.0090.00316.63
7.2.90.0100.00316.77
7.2.80.0030.01416.41
7.2.70.0040.01516.18
7.2.60.0110.00316.77
7.2.50.0080.01116.83
7.2.40.0030.00916.81
7.2.30.0030.01316.70
7.2.20.0000.01416.73
7.2.10.0060.00916.48
7.2.00.0110.00317.86
7.1.330.0040.01115.66
7.1.320.0060.00915.35
7.1.310.0060.00615.91
7.1.300.0060.00315.68
7.1.290.0050.00515.68
7.1.280.0060.01015.73
7.1.270.0070.00715.34
7.1.260.0060.00615.68
7.1.250.0000.00915.57
7.1.200.0070.00715.66
7.1.100.0000.01217.62
7.1.70.0050.00516.78
7.1.60.0150.00919.40
7.1.50.0100.01316.50
7.1.00.0070.06722.31
7.0.200.0000.00716.43
7.0.140.0030.07322.19
7.0.120.0000.07022.09
7.0.100.0470.07719.99
7.0.90.0000.04720.03
7.0.80.0500.07319.96
7.0.70.0170.07020.00
7.0.60.0570.07020.01
7.0.50.0500.07720.38
7.0.40.0030.09020.02
7.0.30.0030.07320.04
7.0.20.0170.07720.09
7.0.10.0030.09720.14
7.0.00.0130.06020.03
5.6.280.0100.06721.08
5.6.250.0130.07320.71
5.6.240.0200.08020.66
5.6.230.0130.08020.64
5.6.220.0070.08720.51
5.6.210.0130.04720.68
5.6.200.0100.07321.19
5.6.190.0130.06721.12
5.6.180.0030.05321.06
5.6.170.0100.08321.02
5.6.160.0030.05321.06
5.6.150.0170.07020.96
5.6.140.0100.04720.94
5.6.130.0030.08020.96
5.6.120.0030.05021.03
5.6.110.0070.08321.01
5.6.100.0030.06321.17
5.6.90.0070.05321.13
5.6.80.0030.04720.50
5.6.70.0130.07320.35
5.6.60.0070.03720.51
5.6.50.0100.04720.43
5.6.40.0100.04320.45
5.6.30.0100.08020.42
5.6.20.0070.07720.39
5.6.10.0170.07320.44
5.6.00.0170.04320.44
5.5.380.0070.08020.39
5.5.370.0100.07320.53
5.5.360.0130.07320.46
5.5.350.0100.07720.38
5.5.340.0070.05020.86
5.5.330.0070.07320.90
5.5.320.0070.10020.93
5.5.310.0170.07320.81
5.5.300.0130.08320.94
5.5.290.0100.07720.80
5.5.280.0100.08020.93
5.5.270.0170.07320.80
5.5.260.0170.04320.75
5.5.250.0070.05320.65
5.5.240.0070.03720.19
5.5.230.0030.08320.25
5.5.220.0030.08020.14
5.5.210.0070.08020.27
5.5.200.0070.06720.01
5.5.190.0000.09020.09
5.5.180.0100.07720.16
5.5.160.0130.05720.09
5.5.150.0070.04320.19
5.5.140.0070.04320.24
5.5.130.0070.04720.27
5.5.120.0130.05020.22
5.5.110.0130.05320.14
5.5.100.0200.06320.17
5.5.90.0070.07320.11
5.5.80.0030.05320.11
5.5.70.0030.05020.11
5.5.60.0030.08020.07
5.5.50.0070.04319.97
5.5.40.0030.05020.07
5.5.30.0070.07320.11
5.5.20.0070.03720.16
5.5.10.0170.06720.04
5.5.00.0170.07020.09
5.4.450.0030.09019.38
5.4.440.0070.09319.22
5.4.430.0170.07319.43
5.4.420.0100.07019.45
5.4.410.0000.04318.98
5.4.400.0070.07719.13
5.4.390.0030.04019.03
5.4.380.0100.07018.96
5.4.370.0000.06718.98
5.4.360.0130.05719.13
5.4.350.0100.07318.81
5.4.340.0100.08018.94
5.4.320.0100.07319.03
5.4.310.0070.07018.96
5.4.300.0070.07019.07
5.4.290.0130.07019.04
5.4.280.0100.06719.02
5.4.270.0030.04318.78
5.4.260.0100.05318.78
5.4.250.0070.05319.11
5.4.240.0070.07019.02
5.4.230.0030.04319.02
5.4.220.0030.03719.05
5.4.210.0000.08019.02
5.4.200.0000.04019.11
5.4.190.0030.06719.04
5.4.180.0030.06319.02
5.4.170.0030.07718.97
5.4.160.0130.05319.03
5.4.150.0070.06319.02
5.4.140.0030.06716.37
5.4.130.0030.04716.33
5.4.120.0070.04316.32
5.4.110.0100.07016.38
5.4.100.0030.03716.31
5.4.90.0070.05316.23
5.4.80.0070.07016.43
5.4.70.0070.07316.39
5.4.60.0030.07316.24
5.4.50.0130.07016.41
5.4.40.0030.06316.34
5.4.30.0070.07316.21
5.4.20.0070.04716.20
5.4.10.0030.08016.41
5.4.00.0100.06715.80
5.3.290.0030.06714.51
5.3.280.0030.08314.57
5.3.270.0030.09014.62
5.3.260.0000.04014.62
5.3.250.0100.07014.61
5.3.240.0070.06714.54
5.3.230.0030.07314.61
5.3.220.0030.03714.55
5.3.210.0070.03714.57
5.3.200.0100.04014.41
5.3.190.0100.07014.45
5.3.180.0170.06714.41
5.3.170.0130.06014.41
5.3.160.0100.07014.56
5.3.150.0030.07714.54
5.3.140.0070.07714.44
5.3.130.0070.08014.57
5.3.120.0030.05714.54
5.3.110.0170.04714.53
5.3.100.0070.08013.92
5.3.90.0070.07713.98
5.3.80.0100.07714.00
5.3.70.0100.07013.90
5.3.60.0000.04013.98
5.3.50.0100.08013.82
5.3.40.0030.04313.96
5.3.30.0070.05013.93
5.3.20.0000.04013.62
5.3.10.0030.07313.63
5.3.00.0070.05313.62
5.2.170.0030.04711.15
5.2.160.0070.06011.16
5.2.150.0070.04711.19
5.2.140.0100.05711.19
5.2.130.0030.05710.96
5.2.120.0030.04311.11
5.2.110.0030.04311.01
5.2.100.0000.03711.08
5.2.90.0030.04710.97
5.2.80.0170.04711.15
5.2.70.0100.05711.10
5.2.60.0070.05011.07
5.2.50.0070.03310.89
5.2.40.0100.03310.98
5.2.30.0000.04011.01
5.2.20.0100.04010.84
5.2.10.0000.05310.91
5.2.00.0030.06010.78
5.1.60.0070.04310.05
5.1.50.0030.05310.04
5.1.40.0030.04310.00
5.1.30.0000.06310.38
5.1.20.0030.05010.40
5.1.10.0070.0539.93
5.1.00.0000.06010.12
5.0.50.0030.0508.65
5.0.40.0100.0408.28
5.0.30.0030.0538.26
5.0.20.0030.0438.21
5.0.10.0070.0408.19
5.0.00.0030.0478.18
4.4.90.0000.0376.77
4.4.80.0030.0176.77
4.4.70.0070.0236.77
4.4.60.0070.0306.77
4.4.50.0000.0336.77
4.4.40.0030.0336.77
4.4.30.0000.0306.77
4.4.20.0000.0376.77
4.4.10.0070.0136.77
4.4.00.0030.0436.77
4.3.110.0030.0306.77
4.3.100.0070.0306.77
4.3.90.0100.0236.77
4.3.80.0000.0436.77
4.3.70.0030.0206.77
4.3.60.0030.0176.77
4.3.50.0070.0336.77
4.3.40.0030.0476.77
4.3.30.0000.0306.77
4.3.20.0030.0236.77
4.3.10.0000.0276.77
4.3.00.0000.0206.77

preferences:
31.34 ms | 400 KiB | 5 Q