3v4l.org

run code in 300+ PHP versions simultaneously
<?php function obj2arr($d) { if (is_object($d)) {$d = get_object_vars($d);} if (is_array($d)) {return array_map(__FUNCTION__, $d);} else {return $d;} } $headers = array(); $postdata = '{"method":"global.login","params":{"userName":"admin","password":"","clientType":"Dahua3.0-Web3.0-NOTIE"},"id":10000}'; $cam = curl_init();curl_setopt($cam,CURLOPT_CUSTOMREQUEST, "POST");curl_setopt($cam,CURLOPT_URL,"http://180.211.114.50:8011/RPC2_Login");curl_setopt($cam,CURLOPT_RETURNTRANSFER,true);curl_setopt($cam,CURLOPT_HTTPHEADER, $headers);curl_setopt($cam,CURLOPT_TIMEOUT,60);curl_setopt($cam,CURLOPT_POSTFIELDS, $postdata); $result=obj2arr(json_decode(curl_exec($cam)));$id = $result['session']; //$headers = array('Cookie:DHLangCookie30=%2Fweb_lang%2FEnglish.txt; DhWebCookie=%7B%22username%22%3A%22admin%22%2C%22pswd%22%3A%22%22%2C%22talktype%22%3A%221%22%2C%22logintype%22%3A%220%22%2C%22openall%22%3A%221%22%2C%22loginid%22%3A0%7D; DhWebClientSessionID=' . $id); $postdata = '{"method":"global.login","session":'.$id.',"params":{"userName":"admin","password":"6QNMIQGe","clientType":"Dahua3.0-Web3.0-NOTIE","authorityType":"OldDigest"},"id":10000}:'; curl_setopt($cam,CURLOPT_POSTFIELDS, $postdata); curl_exec($cam);curl_close($cam); for($a =0; $a<=15;$a++) { echo "<img src='http://180.211.114.50:8011/cgi-bin/Snapshot.cgi?channel={$a}&sessionId={$id}' width='352' height='288'>"; } ?>

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.60.0170.00318.30
8.3.50.0000.01318.06
8.3.40.0160.00318.96
8.3.30.0070.01419.21
8.3.20.0000.00820.36
8.3.10.0040.00420.66
8.3.00.0090.00919.38
8.2.180.0180.00316.75
8.2.170.0110.00422.96
8.2.160.0150.00621.02
8.2.150.0030.00524.18
8.2.140.0120.00624.66
8.2.130.0000.00726.16
8.2.120.0050.00322.23
8.2.110.0090.00020.56
8.2.100.0040.00717.97
8.2.90.0030.00519.08
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0080.00018.10
8.2.30.0100.00019.29
8.2.20.0000.00717.60
8.2.10.0040.00418.10
8.2.00.0080.00017.82
8.1.270.0070.00022.05
8.1.260.0000.00726.35
8.1.250.0110.00428.09
8.1.240.0060.00323.87
8.1.230.0080.00319.21
8.1.220.0050.00317.76
8.1.210.0080.00018.77
8.1.200.0090.00317.23
8.1.190.0060.00317.00
8.1.180.0040.00418.10
8.1.170.0050.00318.50
8.1.160.0000.00722.06
8.1.150.0020.00518.83
8.1.140.0050.00217.47
8.1.130.0030.00317.74
8.1.120.0030.00417.43
8.1.110.0040.00417.41
8.1.100.0040.00417.29
8.1.90.0000.00717.44
8.1.80.0000.00817.47
8.1.70.0040.00417.38
8.1.60.0030.00517.49
8.1.50.0030.00617.51
8.1.40.0000.00717.55
8.1.30.0040.00417.55
8.1.20.0040.00417.68
8.1.10.0080.00017.47
8.1.00.0040.00417.38
8.0.300.0030.00518.77
8.0.290.0000.00716.75
8.0.280.0030.00318.43
8.0.270.0040.00417.15
8.0.260.0000.00617.28
8.0.250.0030.00316.98
8.0.240.0030.00316.96
8.0.230.0070.00017.01
8.0.220.0030.00316.97
8.0.210.0000.00616.82
8.0.200.0060.00016.90
8.0.190.0050.00317.01
8.0.180.0040.00416.99
8.0.170.0000.00716.85
8.0.160.0030.00316.91
8.0.150.0070.00016.91
8.0.140.0040.00416.96
8.0.130.0060.00013.43
8.0.120.0000.00816.93
8.0.110.0040.00416.82
8.0.100.0040.00416.91
8.0.90.0040.00416.92
8.0.80.0080.00816.84
8.0.70.0040.00416.93
8.0.60.0070.00016.99
8.0.50.0030.00516.82
8.0.30.0080.01017.10
8.0.20.0150.00717.40
8.0.10.0050.00317.09
8.0.00.0140.00316.75
7.4.330.0050.00015.15
7.4.320.0000.00716.48
7.4.300.0030.00316.64
7.4.290.0050.00316.52
7.4.280.0040.00416.59
7.4.270.0050.00216.64
7.4.260.0000.00716.52
7.4.250.0030.00516.61
7.4.240.0030.00316.52
7.4.230.0030.00516.64
7.4.220.0190.00316.64
7.4.210.0080.00516.65
7.4.200.0070.00016.75
7.4.160.0170.00016.64
7.4.150.0150.00517.40
7.4.140.0110.00917.86
7.4.130.0110.00616.60
7.4.120.0050.01216.61
7.4.110.0130.00316.66
7.4.100.0090.00916.56
7.4.90.0130.01016.48
7.4.80.0100.00718.63
7.4.70.0100.00716.66
7.4.60.0050.01516.65
7.4.50.0000.00916.48
7.4.40.0040.01316.59
7.4.30.0100.00716.52
7.4.00.0110.00415.02
7.3.330.0000.00613.16
7.3.320.0000.00513.16
7.3.310.0040.00416.45
7.3.300.0000.00716.38
7.3.290.0090.00916.34
7.3.280.0110.01016.39
7.3.270.0130.00617.40
7.3.260.0130.00416.32
7.3.250.0110.01016.45
7.3.240.0160.00716.58
7.3.230.0100.00716.49
7.3.210.0100.00716.25
7.3.200.0030.02019.39
7.3.190.0160.00016.35
7.3.180.0120.00316.21
7.3.170.0090.00916.50
7.3.160.0100.00716.33
7.3.00.0110.00816.32
7.2.330.0140.00316.22
7.2.320.0140.00316.31
7.2.310.0130.00416.53
7.2.300.0100.00716.59
7.2.290.0050.01116.52
7.2.130.0100.01116.68
7.2.120.0070.01116.71
7.2.110.0150.00416.60
7.2.100.0170.00016.73
7.2.90.0060.01016.52
7.2.80.0060.01016.52
7.2.70.0060.00916.44
7.2.60.0100.00716.78
7.2.50.0110.00316.71
7.2.40.0090.00616.60
7.2.30.0170.00016.66
7.2.20.0040.01116.71
7.2.10.0170.00316.53
7.2.00.0080.00718.06
7.1.250.0100.00715.45
7.1.240.0060.00615.23
7.1.230.0040.00415.34
7.1.220.0110.00415.15
7.1.210.0130.00315.52
7.1.200.0080.00715.68
7.1.190.0100.00715.56
7.1.180.0170.00315.55
7.1.170.0110.00715.36
7.1.160.0130.00315.22
7.1.150.0030.01415.29
7.1.140.0090.00615.27
7.1.130.0040.01115.49
7.1.120.0130.00315.64
7.1.110.0170.00415.49
7.1.100.0090.00616.92
7.1.90.0040.01315.65
7.1.80.0040.01215.62
7.1.70.0100.00216.09
7.1.60.0030.01217.35
7.1.50.0100.00816.25
7.1.40.0100.00715.62
7.1.30.0100.00715.35
7.1.20.0060.00915.57
7.1.10.0070.00715.29
7.1.00.0110.03618.75
7.0.330.0090.00615.23
7.0.320.0090.00614.72
7.0.310.0130.00315.24
7.0.300.0070.01115.26
7.0.290.0100.00315.23
7.0.280.0100.01015.19
7.0.270.0110.00414.93
7.0.260.0060.00615.11
7.0.250.0070.01114.93
7.0.240.0120.00815.20
7.0.230.0120.00415.04
7.0.220.0120.00915.03
7.0.210.0170.00015.22
7.0.200.0070.00615.84
7.0.190.0040.01115.00
7.0.180.0110.00615.45
7.0.170.0090.00315.13
7.0.160.0090.00615.10
7.0.150.0140.00315.18
7.0.140.0080.03718.45
7.0.130.0110.00415.16
7.0.120.0090.00615.47
7.0.110.0130.00315.33
7.0.100.0170.03217.62
7.0.90.0050.04817.58
7.0.80.0080.04117.62
7.0.70.0110.04017.53
7.0.60.0100.04217.53
7.0.50.0030.04817.65
7.0.40.0020.04316.70
7.0.30.0080.03916.67
7.0.20.0060.04316.60
7.0.10.0030.04516.73
7.0.00.0050.03416.53
5.6.380.0120.00313.80
5.6.370.0080.00314.02
5.6.360.0120.00314.23
5.6.350.0110.00413.93
5.6.340.0030.01014.01
5.6.330.0070.00713.57
5.6.320.0040.01114.00
5.6.310.0000.00813.88
5.6.300.0060.00613.82
5.6.290.0100.00314.09
5.6.280.0040.03917.48
5.6.270.0060.00613.74
5.6.260.0120.00314.07
5.6.250.0080.04317.14
5.6.240.0080.03817.25
5.6.230.0070.02517.25
5.6.220.0100.04017.35
5.6.210.0070.03117.28
5.6.200.0030.03717.43
5.6.190.0070.04417.38
5.6.180.0050.04717.65
5.6.170.0050.04717.43
5.6.160.0080.04717.39
5.6.150.0060.04117.44
5.6.140.0050.04717.60
5.6.130.0060.04317.47
5.6.120.0060.04517.56
5.6.110.0070.04817.58
5.6.100.0060.03417.40
5.6.90.0110.04017.70
5.6.80.0070.03017.20
5.6.70.0030.04117.07
5.6.60.0120.03517.08
5.6.50.0090.04217.32
5.6.40.0110.04117.13
5.6.30.0080.04017.07
5.6.20.0030.03017.22
5.6.10.0030.03117.17
5.6.00.0050.04617.06
5.5.380.0070.02715.77
5.5.370.0090.04215.72
5.5.360.0020.03115.72
5.5.350.0060.04015.73
5.5.340.0180.03216.02
5.5.330.0060.04315.85
5.5.320.0080.02415.86
5.5.310.0070.02815.91
5.5.300.0080.02315.91
5.5.290.0050.04715.96
5.5.280.0050.03715.87
5.5.270.0080.03015.81
5.5.260.0070.04515.88
5.5.250.0090.02015.82
5.5.240.0070.04015.51
5.5.230.0050.03715.52
5.5.220.0050.03815.57
5.5.210.0090.04115.52
5.5.200.0070.04315.55
5.5.190.0100.04015.59
5.5.180.0060.04115.52
5.5.170.0040.00410.90
5.5.160.0100.03815.52
5.5.150.0020.04415.52
5.5.140.0030.04515.56
5.5.130.0100.03815.56
5.5.120.0030.02515.45
5.5.110.0080.03515.57
5.5.100.0020.02415.55
5.5.90.0090.04015.46
5.5.80.0110.02715.48
5.5.70.0080.03715.53
5.5.60.0070.02715.44
5.5.50.0050.04315.59
5.5.40.0070.02715.50
5.5.30.0110.02915.49
5.5.20.0090.02515.49
5.5.10.0030.03015.52
5.5.00.0030.04115.48
5.4.450.0080.04315.06
5.4.440.0030.02315.17
5.4.430.0020.04815.17
5.4.420.0060.04115.13
5.4.410.0020.04815.06
5.4.400.0070.04015.07
5.4.390.0050.04414.90
5.4.380.0080.04014.87
5.4.370.0120.03315.05
5.4.360.0070.03514.98
5.4.350.0050.03214.89
5.4.340.0100.03814.90
5.4.330.0030.00310.90
5.4.320.0070.03714.99
5.4.310.0050.02815.02
5.4.300.0050.04015.01
5.4.290.0070.03814.87
5.4.280.0030.04415.10
5.4.270.0070.04014.97
5.4.260.0080.03914.95
5.4.250.0100.03715.01
5.4.240.0080.03615.09
5.4.230.0100.03514.99
5.4.220.0110.03414.97
5.4.210.0050.04115.04
5.4.200.0090.04214.96
5.4.190.0090.03414.96
5.4.180.0100.01514.87
5.4.170.0030.04115.04
5.4.160.0120.03514.96
5.4.150.0050.04115.06
5.4.140.0060.04013.71
5.4.130.0030.03813.62
5.4.120.0050.03413.68
5.4.110.0050.03413.64
5.4.100.0020.04413.69
5.4.90.0050.02313.69
5.4.80.0030.04113.66
5.4.70.0030.03613.62
5.4.60.0070.03713.67
5.4.50.0000.03913.63
5.4.40.0050.03213.64
5.4.30.0050.01813.64
5.4.20.0060.03613.68
5.4.10.0080.03513.63
5.4.00.0050.04213.29
5.3.290.0090.02012.81
5.3.280.0050.04312.72
5.3.270.0080.04112.80
5.3.260.0070.03512.81
5.3.250.0090.03312.73
5.3.240.0070.03612.75
5.3.230.0060.02112.76
5.3.220.0060.04312.71
5.3.210.0070.03312.77
5.3.200.0060.04012.73
5.3.190.0020.03912.75
5.3.180.0060.02512.79
5.3.170.0040.03712.71
5.3.160.0090.03912.75
5.3.150.0070.04012.73
5.3.140.0060.01812.71
5.3.130.0030.03012.76
5.3.120.0070.03912.69
5.3.110.0100.03612.74
5.3.100.0080.04112.51
5.3.90.0050.03812.44
5.3.80.0100.03312.47
5.3.70.0080.03712.42
5.3.60.0120.03312.49
5.3.50.0070.03712.43
5.3.40.0030.04112.50
5.3.30.0100.03212.42
5.3.20.0080.03312.37
5.3.10.0050.03512.29
5.3.00.0030.04312.29
5.2.170.0030.03512.29
5.2.160.0060.03012.29
5.2.150.0070.02812.29
5.2.140.0080.03012.29
5.2.130.0050.02912.29
5.2.120.0050.03312.29
5.2.110.0060.03212.29
5.2.100.0080.02312.29
5.2.90.0050.03012.29
5.2.80.0020.02612.29
5.2.70.0050.03012.29
5.2.60.0010.02912.29
5.2.50.0050.03212.29
5.2.40.0070.02312.29
5.2.30.0050.03012.29
5.2.20.0050.02812.29
5.2.10.0050.03212.29
5.2.00.0060.02312.29
5.1.60.0040.02112.29
5.1.50.0050.02812.29
5.1.40.0050.01612.29
5.1.30.0080.02712.29
5.1.20.0080.02312.29
5.1.10.0020.01912.29
5.1.00.0020.03012.29
5.0.50.0030.01312.29
5.0.40.0020.02312.29
5.0.30.0030.03512.29
5.0.20.0050.02012.29
5.0.10.0030.01912.29
5.0.00.0020.03112.29
4.4.90.0020.02012.29
4.4.80.0050.01812.29
4.4.70.0060.01512.29
4.4.60.0050.01712.29
4.4.50.0020.02012.29
4.4.40.0040.01812.29
4.4.30.0040.01812.29
4.4.20.0000.01612.29
4.4.10.0000.01712.29
4.4.00.0040.02512.29
4.3.110.0000.02112.29
4.3.100.0000.02212.29
4.3.90.0020.02012.29
4.3.80.0050.02712.29
4.3.70.0020.02012.29
4.3.60.0000.02212.29
4.3.50.0010.01612.29
4.3.40.0010.02812.29
4.3.30.0050.01812.29
4.3.20.0060.01212.29
4.3.10.0000.01712.29
4.3.00.0050.01612.29

preferences:
37.87 ms | 400 KiB | 5 Q