3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** Ajax Streaming without polling */ //type octet-stream. make sure apache does not gzip this type, else it would get buffered header('Content-Type: text/octet-stream'); header('Cache-Control: no-cache'); // recommended to prevent caching of event data. /** Send a partial message */ function send_message($id, $message, $progress) { $d = array('message' => $message , 'progress' => $progress); echo json_encode($d) . PHP_EOL; //PUSH THE data out by all FORCE POSSIBLE ob_flush(); flush(); } $serverTime = time(); //LONG RUNNING TASK for($i = 0; $i < 10; $i++) { //Hard work!! sleep(1); //send status message $p = ($i+1)*10; //Progress send_message($serverTime, $p . '% complete. server time: ' . date("h:i:s", time()) , $p); } sleep(1); send_message($serverTime, 'COMPLETE', '100');

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.00.0040.01119.53
7.1.100.0000.01117.88
7.1.70.0050.00517.09
7.1.60.0040.00717.43
7.1.50.0110.01117.37
7.1.00.0000.08022.27
7.0.200.0040.01216.93
7.0.140.0130.06322.07
7.0.100.0430.07319.95
7.0.90.0030.06719.94
7.0.80.0030.06719.89
7.0.70.0070.06719.89
7.0.60.0130.07019.99
7.0.50.0130.08320.34
7.0.40.0170.07320.05
7.0.30.0070.08720.15
7.0.20.0200.06720.03
7.0.10.0170.07320.13
7.0.00.0030.05720.17
5.6.280.0070.06721.11
5.6.250.0100.05020.70
5.6.240.0070.08720.63
5.6.230.0030.09320.62
5.6.220.0130.07320.71
5.6.210.0130.06720.57
5.6.200.0100.07321.06
5.6.190.0230.07320.96
5.6.180.0170.05721.14
5.6.170.0170.07721.04
5.6.160.0000.04721.02
5.6.150.0030.04321.05
5.6.140.0170.06720.95
5.6.130.0170.05320.99
5.6.120.0070.09021.11
5.6.110.0070.08321.08
5.6.100.0130.08321.01
5.6.90.0130.07021.00
5.6.80.0030.08020.39
5.6.70.0170.07020.46
5.6.60.0100.03320.49
5.6.50.0200.07020.39
5.6.40.0100.07320.32
5.6.30.0100.08020.39
5.6.20.0100.07320.30
5.6.10.0130.06720.38
5.6.00.0100.07020.36
5.5.380.0200.06720.45
5.5.370.0070.08720.50
5.5.360.0000.09020.35
5.5.350.0070.06020.34
5.5.340.0070.07720.74
5.5.330.0070.08320.93
5.5.320.0070.07020.80
5.5.310.0100.08320.88
5.5.300.0070.04720.92
5.5.290.0030.08320.78
5.5.280.0070.05320.86
5.5.270.0130.07020.89
5.5.260.0100.04720.75
5.5.250.0130.07720.57
5.5.240.0170.06320.11
5.5.230.0030.05720.29
5.5.220.0030.09720.26
5.5.210.0130.06720.27
5.5.200.0100.07020.27
5.5.190.0130.06720.28
5.5.180.0100.07720.19
5.5.160.0130.07320.27
5.5.150.0000.08320.14
5.5.140.0030.05020.26
5.5.130.0070.06320.11
5.5.120.0200.06720.17
5.5.110.0030.07720.08
5.5.100.0070.07720.12
5.5.90.0070.05719.97
5.5.80.0030.08320.04
5.5.70.0100.07320.12
5.5.60.0030.04720.06
5.5.50.0070.07320.11
5.5.40.0030.07720.03
5.5.30.0170.07019.96
5.5.20.0070.03719.95
5.5.10.0100.05720.06
5.5.00.0070.03320.04
5.4.450.0070.08019.45
5.4.440.0130.07319.22
5.4.430.0100.06719.28
5.4.420.0030.06719.31
5.4.410.0100.08019.22
5.4.400.0130.06718.97
5.4.390.0100.03318.93
5.4.380.0130.07718.84
5.4.370.0070.07319.03
5.4.360.0030.05718.82
5.4.350.0070.07319.08
5.4.340.0030.08318.99
5.4.320.0070.08018.89
5.4.310.0100.06018.96
5.4.300.0100.03018.96
5.4.290.0100.03019.00
5.4.280.0070.07718.97
5.4.270.0100.07319.11
5.4.260.0070.06319.02
5.4.250.0100.07018.97
5.4.240.0130.06718.79
5.4.230.0100.05719.02
5.4.220.0070.07318.82
5.4.210.0130.06718.82
5.4.200.0000.08018.79
5.4.190.0130.07318.95
5.4.180.0100.03718.96
5.4.170.0070.07018.96
5.4.160.0230.06018.91
5.4.150.0070.07718.95
5.4.140.0000.08316.35
5.4.130.0030.07016.47
5.4.120.0130.06016.17
5.4.110.0070.07716.31
5.4.100.0070.07016.45
5.4.90.0070.07016.40
5.4.80.0130.03016.32
5.4.70.0170.06716.43
5.4.60.0030.08016.42
5.4.50.0170.06316.28
5.4.40.0170.06016.31
5.4.30.0030.08016.27
5.4.20.0100.03016.23
5.4.10.0000.06716.33
5.4.00.0100.06015.77

preferences:
28.91 ms | 401 KiB | 5 Q