3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* get system resource precentages */ function serverStatus() { /* cpu usage */ $cpuUsage=NULL; exec('ps -aux', $processes); foreach($processes as $process){ $cols = split(' ', ereg_replace(' +', ' ', $process)); if (strpos($cols[2], '.') > -1){ $cpuUsage += floatval($cols[2]); } } $sysLoad = sys_getloadavg(); /* get raspberry pi temp */ $rawTemp = shell_exec('/opt/vc/bin/vcgencmd measure_temp'); /* trim temp= from the response */ $temp_c = round(str_replace("temp=", "", $rawTemp),2); $temp_f = round((($temp_c * 9) / 5) + 32,2); /* memory usage */ foreach(file('/proc/meminfo') as $ri) $m[strtok($ri, ':')] = strtok(''); /* displays memory used precentage */ $memory = 100 - round(($m['MemFree'] + $m['Buffers'] + $m['Cached']) / $m['MemTotal'] * 100); /* free memory in mB rounded to tenths */ $memoryFree = round($m['MemFree']/(1024), 2); /* Buffered memory in mB rounded to tenths */ $bufferedMem = round($m['Buffers']/(1024), 2); /* cached Memoty in mB and rounded to tenths */ $cachedMem = round($m['Cached']/(1024),2); /* total memory in mB rounded to tenths */ $TotleMem = round($m['MemTotal']/(1024),2); /* disk free space a gigabytes and rounded to tenths */ $freeSpace = round(disk_free_space("/")/(1024*1024*1024), 2); /* total disk space in gigabytes and rounded to tenths */ $totalSpace = round(disk_total_space("/")/(1024*1024*1024), 2); /* disk free space in precentage */ $freePrecent = round($freeSpace / $totalSpace * 100, 2); /* server uptime*/ $uptime = shell_exec("cut -d. -f1 /proc/uptime"); $days = floor($uptime/60/60/24); $hours = $uptime/60/60%24; $mins = $uptime/60%60; $secs = $uptime%60; /* current server time */ $obsTime= date("g:i a" ,time()).' on '.date("l, F d, Y" ,time()); /* build status array */ $status=array( 'cpu' => $cpuUsage.' %', 'system load' => $sysLoad, 'cpu temp_c' => $temp_c.' C', 'cpu temp_f' => $temp_f.' F', 'memory' => $memory.' %', 'memory free' => $memoryFree.' mB', 'buffered memory' => $bufferedMem.' mB', 'memory cached' => $cachedMem.' mB', 'total memory' => $TotleMem.' mB', 'free gb' => $freeSpace.' gB', 'free precent' => $freePrecent.' %', 'total gb' => $totalSpace.' gB', 'uptime' => $days.' days '.$hours.' hours '.$mins.' minutes and '.$secs.' seconds', 'observation time' => $obsTime ); return $status; }

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.10.0030.01414.47
7.4.00.0100.00614.91
7.3.130.0070.01114.48
7.3.120.0050.01314.43
7.3.110.0040.01214.69
7.3.100.0080.00614.70
7.3.90.0070.00314.74
7.3.80.0100.00514.69
7.3.70.0060.00814.77
7.3.60.0070.00714.51
7.3.50.0050.00914.72
7.3.40.0070.00514.66
7.3.30.0090.00514.75
7.3.20.0050.00616.36
7.3.10.0070.00716.45
7.3.00.0090.00416.41
7.2.260.0070.01014.52
7.2.250.0050.01414.84
7.2.240.0050.01214.72
7.2.230.0050.00614.96
7.2.220.0050.00714.77
7.2.210.0080.00714.85
7.2.200.0040.00515.02
7.2.190.0070.00714.91
7.2.180.0080.00514.80
7.2.170.0050.00614.95
7.2.160.0090.00914.90
7.2.150.0040.01116.66
7.2.140.0090.00616.31
7.2.130.0030.01016.87
7.2.120.0070.00716.71
7.2.110.0040.01416.51
7.2.100.0060.00916.39
7.2.90.0120.00316.41
7.2.80.0070.01016.38
7.2.70.0000.01416.78
7.2.60.0100.00316.63
7.2.50.0030.01116.70
7.2.40.0000.01116.86
7.2.30.0070.00716.68
7.2.20.0130.00316.57
7.2.10.0120.00416.66
7.2.00.0000.01016.62
7.1.330.0110.00415.59
7.1.320.0030.01315.42
7.1.310.0070.00815.50
7.1.300.0060.00715.50
7.1.290.0020.01315.57
7.1.280.0030.01015.34
7.1.270.0020.01215.64
7.1.260.0090.00615.69
7.1.250.0030.00615.63
7.1.240.0000.01315.31
7.1.230.0030.01315.21
7.1.220.0090.00315.71
7.1.210.0080.00615.39
7.1.200.0040.01115.39
7.1.190.0040.01115.20
7.1.180.0030.00515.47
7.1.170.0070.00715.34
7.1.160.0050.00315.30
7.1.150.0030.00615.47
7.1.140.0050.00515.50
7.1.130.0080.00415.34
7.1.120.0000.01615.43
7.1.110.0070.00715.62
7.1.100.0120.00615.56
7.1.90.0040.01415.35
7.1.80.0000.00815.41
7.1.70.0050.00716.30
7.1.60.0090.00817.42
7.1.50.0070.00916.15
7.1.40.0070.00315.64
7.1.30.0060.00915.57
7.1.20.0030.00915.44
7.1.10.0080.00415.41
7.1.00.0070.03819.00
7.0.330.0000.00815.18
7.0.320.0030.00715.11
7.0.310.0030.01015.16
7.0.300.0060.00615.18
7.0.290.0090.00315.33
7.0.280.0050.00315.39
7.0.270.0030.00915.32
7.0.260.0040.00815.23
7.0.250.0030.01015.31
7.0.240.0060.00615.20
7.0.230.0070.00715.20
7.0.220.0130.00315.25
7.0.210.0000.01415.14
7.0.200.0020.00815.77
7.0.190.0060.00615.20
7.0.180.0060.00315.34
7.0.170.0030.01015.29
7.0.160.0000.01515.30
7.0.150.0050.00515.46
7.0.140.0030.04118.55
7.0.130.0080.00315.02
7.0.120.0140.00315.35
7.0.110.0130.00315.14
7.0.100.0000.01414.99
7.0.90.0070.04217.54
7.0.80.0120.01717.65
7.0.70.0050.04117.56
7.0.60.0090.04217.52
7.0.50.0230.04117.87
7.0.40.0100.03716.72
7.0.30.0060.02516.71
7.0.20.0030.03716.75
7.0.10.0060.04116.77
7.0.00.0080.02316.70
5.6.400.0030.01013.93
5.6.390.0060.00614.26
5.6.380.0090.00314.06
5.6.370.0100.00313.87
5.6.360.0000.01413.91
5.6.350.0000.00914.43
5.6.340.0040.00714.12
5.6.330.0080.00414.27
5.6.320.0040.01113.97
5.6.310.0110.00414.09
5.6.300.0060.00614.16
5.6.290.0040.00714.40
5.6.280.0050.03817.61
5.6.270.0070.01014.37
5.6.260.0030.00914.26
5.6.250.0070.01014.21
5.6.240.0070.04117.41
5.6.230.0050.02217.26
5.6.220.0070.04617.42
5.6.210.0110.02117.32
5.6.200.0070.03817.54
5.6.190.0070.02917.63
5.6.180.0080.04517.42
5.6.170.0030.02517.45
5.6.160.0080.04617.63
5.6.150.0050.04617.59
5.6.140.0060.04617.53
5.6.130.0060.02517.62
5.6.120.0050.03817.63
5.6.110.0080.02017.61
5.6.100.0070.03517.54
5.6.90.0050.02217.67
5.6.80.0070.04017.32
5.6.70.0060.04317.25
5.6.60.0050.03017.17
5.6.50.0050.04517.19
5.6.40.0080.04217.31
5.6.30.0090.04117.28
5.6.20.0070.02817.01
5.6.10.0080.02017.29
5.6.00.0090.03917.21
5.5.380.0020.02917.06
5.5.370.0110.01817.19
5.5.360.0050.03217.15
5.5.350.0090.02317.31
5.5.340.0050.02717.42
5.5.330.0080.02317.25
5.5.320.0030.03917.29
5.5.310.0050.02417.39
5.5.300.0100.01517.40
5.5.290.0070.02817.59
5.5.280.0070.03417.38
5.5.270.0090.04317.34
5.5.260.0110.03717.31
5.5.250.0080.04517.22
5.5.240.0050.02917.01
5.5.230.0050.04317.21
5.5.220.0110.03017.11
5.5.210.0030.03916.97
5.5.200.0050.03517.12
5.5.190.0050.03317.04
5.5.180.0080.02517.13
5.5.170.0100.00714.03
5.5.160.0070.03917.02
5.5.150.0070.02717.12
5.5.140.0060.03717.06
5.5.130.0070.03716.98
5.5.120.0020.02716.96
5.5.110.0070.03717.01
5.5.100.0020.02716.87
5.5.90.0030.02517.01
5.5.80.0090.04016.92
5.5.70.0020.02917.13
5.5.60.0050.02516.87
5.5.50.0020.02617.06
5.5.40.0000.03016.79
5.5.30.0060.02817.10
5.5.20.0030.04516.97
5.5.10.0050.04517.01
5.5.00.0130.03316.98
5.4.450.0050.03715.05
5.4.440.0030.02314.85
5.4.430.0100.04515.15
5.4.420.0080.01615.21
5.4.410.0040.03515.06
5.4.400.0040.02814.88
5.4.390.0030.04414.77
5.4.380.0070.03514.80
5.4.370.0030.02414.92
5.4.360.0050.04214.90
5.4.350.0070.01814.91
5.4.340.0030.04414.89
5.4.330.0070.00010.54
5.4.320.0070.02215.07
5.4.310.0050.02514.92
5.4.300.0020.04415.01
5.4.290.0080.03514.95
5.4.280.0070.03415.08
5.4.270.0060.04314.90
5.4.260.0070.02215.05
5.4.250.0050.02414.94
5.4.240.0040.02714.83
5.4.230.0030.02315.06
5.4.220.0000.02314.89
5.4.210.0060.02314.97
5.4.200.0030.03314.97
5.4.190.0050.02214.81
5.4.180.0030.04214.96
5.4.170.0020.03014.74
5.4.160.0080.03514.88
5.4.150.0070.04214.82
5.4.140.0070.04013.63
5.4.130.0040.04013.48
5.4.120.0050.03813.62
5.4.110.0060.02313.62
5.4.100.0090.01913.69
5.4.90.0100.03213.47
5.4.80.0080.03813.68
5.4.70.0050.02413.73
5.4.60.0020.04013.57
5.4.50.0050.04013.67
5.4.40.0030.02513.60
5.4.30.0060.04113.59
5.4.20.0030.02413.57
5.4.10.0060.03513.52
5.4.00.0090.02313.24
5.3.290.0030.02712.51
5.3.280.0060.01812.53
5.3.270.0030.02512.58
5.3.260.0020.03812.45
5.3.250.0070.03912.53
5.3.240.0010.02612.47
5.3.230.0100.03812.55
5.3.220.0080.03212.44
5.3.210.0050.04512.45
5.3.200.0070.03712.33
5.3.190.0030.02312.52
5.3.180.0030.03112.56
5.3.170.0090.03412.40
5.3.160.0020.04512.43
5.3.150.0050.02212.40
5.3.140.0030.03012.58
5.3.130.0100.02012.50
5.3.120.0070.04012.39
5.3.110.0030.02812.53
5.3.100.0000.03212.15
5.3.90.0030.02912.19
5.3.80.0050.03512.17
5.3.70.0020.04212.18
5.3.60.0040.03112.28
5.3.50.0060.03712.14
5.3.40.0100.01712.12
5.3.30.0030.03812.14
5.3.20.0000.02411.96
5.3.10.0070.02411.81
5.3.00.0050.04011.92
5.2.170.0000.06011.20
5.2.160.0000.04311.17
5.2.150.0070.04311.09
5.2.140.0030.03711.15
5.2.130.0100.05711.14
5.2.120.0030.06311.03
5.2.110.0130.04311.18
5.2.100.0070.06311.23
5.2.90.0070.05011.16
5.2.80.0070.02711.14
5.2.70.0000.05311.05
5.2.60.0000.03711.16
5.2.50.0070.03011.09
5.2.40.0070.03310.93
5.2.30.0100.04011.10
5.2.20.0100.05310.99
5.2.10.0030.03010.81
5.2.00.0000.05710.77
5.1.60.0030.05310.77
5.1.50.0030.04710.77
5.1.40.0030.02310.77
5.1.30.0030.02710.77
5.1.20.0030.03710.77
5.1.10.0000.02710.77
5.1.00.0070.02310.77
5.0.50.0000.02010.77
5.0.40.0000.02010.77
5.0.30.0000.03310.77
5.0.20.0070.01310.77
5.0.10.0070.01310.77
5.0.00.0000.03310.77
4.4.90.0070.01310.77
4.4.80.0070.02010.77
4.4.70.0030.03710.77
4.4.60.0030.01310.77
4.4.50.0000.01710.77
4.4.40.0000.02710.77
4.4.30.0000.01710.77
4.4.20.0000.01710.77
4.4.10.0000.01310.77
4.4.00.0000.02710.77
4.3.110.0000.02310.77
4.3.100.0000.01710.77
4.3.90.0000.01310.77
4.3.80.0000.02310.77
4.3.70.0070.01010.77
4.3.60.0000.01310.77
4.3.50.0000.01710.77
4.3.40.0030.02310.77
4.3.30.0000.01710.77
4.3.20.0000.01710.77
4.3.10.0000.01310.77
4.3.00.0030.01310.77

preferences:
49.15 ms | 401 KiB | 5 Q