3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function XMLRPC_response($return_value, $server = NULL){ $data["methodResponse"]["params"]["param"]["value"] = $return_value; $return = XML_serialize($data); if(defined('XMLRPC_DEBUG') and XMLRPC_DEBUG){ XMLRPC_debug('XMLRPC_response', "<p>Received the following data to return:</p>\n\n" . XMLRPC_show($return_value, 'print_r', true)); } header("Connection: close"); header("Content-Length: " . strlen($return)); header("Content-Type: text/xml"); header("Date: " . date("r")); if($server){ header("Server: $server"); } if(defined('XMLRPC_DEBUG') and XMLRPC_DEBUG){ XMLRPC_debug('XMLRPC_response', "<p>Sent the following response:</p>\n\n" . XMLRPC_show($return, 'print_r', true)); } echo $return; //file_put_contents('xmlrpc.xml', $return); } function XMLRPC_error($faultCode, $faultString, $server = NULL){ $array["methodResponse"]["fault"]["value"]["struct"]["member"] = array(); $temp = &$array["methodResponse"]["fault"]["value"]["struct"]["member"]; $temp[0]["name"] = "faultCode"; $temp[0]["value"]["int"] = $faultCode; $temp[1]["name"] = "faultString"; $temp[1]["value"]["string"] = $faultString; $return = XML_serialize($array); header("Connection: close"); header("Content-Length: " . strlen($return)); header("Content-Type: text/xml"); header("Date: " . date("r")); if($server){ header("Server: $server"); } if(defined('XMLRPC_DEBUG') and XMLRPC_DEBUG){ XMLRPC_debug('XMLRPC_error', "<p>Sent the following error response:</p>\n\n" . XMLRPC_show($return, 'print_r', true)); } echo $return; } function XMLRPC_convert_timestamp_to_iso8601($timestamp){ #takes a unix timestamp and converts it to iso8601 required by XMLRPC #an example iso8601 datetime is "20010822T03:14:33" return date("Ymd\TH:i:s", $timestamp); } function XMLRPC_convert_iso8601_to_timestamp($iso8601){ return strtotime($iso8601); } function count_numeric_items(&$array){ return is_array($array) ? count(array_filter(array_keys($array), 'is_numeric')) : 0; } function XMLRPC_debug($function_name, $debug_message){ $GLOBALS['XMLRPC_DEBUG_INFO'][] = array($function_name, $debug_message); } function XMLRPC_debug_print(){ if($GLOBALS['XMLRPC_DEBUG_INFO']){ echo "<table border=\"1\" width=\"100%\">\n"; foreach($GLOBALS['XMLRPC_DEBUG_INFO'] as $debug){ echo "<tr><th style=\"vertical-align: top\">$debug[0]</th><td>$debug[1]</td></tr>\n"; } echo "</table>\n"; unset($GLOBALS['XMLRPC_DEBUG_INFO']); }else{ echo "<p>No debugging information available yet.</p>"; } } function XMLRPC_show($data, $func = "print_r", $return_str = false){ ob_start(); $func($data); $output = ob_get_contents(); ob_end_clean(); if($return_str){ return "<pre>" . htmlspecialchars($output) . "</pre>\n"; }else{ echo "<pre>", htmlspecialchars($output), "</pre>\n"; } }

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.0070.00718.18
8.3.50.0110.01022.86
8.3.40.0120.00618.58
8.3.30.0110.00419.04
8.3.20.0040.00420.39
8.3.10.0040.00423.55
8.3.00.0080.00019.13
8.2.180.0070.00716.38
8.2.170.0090.00622.96
8.2.160.0150.00020.52
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0050.00320.92
8.2.110.0090.00022.08
8.2.100.0070.00317.97
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0050.00317.38
8.2.60.0050.00317.91
8.2.50.0000.01218.07
8.2.40.0000.00819.76
8.2.30.0000.00719.55
8.2.20.0070.00017.49
8.2.10.0040.00417.99
8.2.00.0030.00517.72
8.1.280.0140.00725.92
8.1.270.0080.00023.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.70
8.1.230.0120.00019.01
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0080.00416.98
8.1.190.0030.00517.11
8.1.180.0030.00518.10
8.1.170.0070.00318.60
8.1.160.0050.00222.00
8.1.150.0070.00018.75
8.1.140.0070.00017.38
8.1.130.0040.00417.82
8.1.120.0050.00217.30
8.1.110.0040.00417.28
8.1.100.0040.00417.38
8.1.90.0070.00017.45
8.1.80.0040.00417.32
8.1.70.0040.00417.31
8.1.60.0060.00317.54
8.1.50.0030.00517.47
8.1.40.0040.00417.41
8.1.30.0050.00317.45
8.1.20.0000.00817.50
8.1.10.0000.00817.30
8.1.00.0040.00417.37
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00718.33
8.0.270.0000.00817.23
8.0.260.0000.00617.25
8.0.250.0000.00716.89
8.0.240.0030.00316.95
8.0.230.0030.00316.90
8.0.220.0060.00416.81
8.0.210.0080.00016.73
8.0.200.0060.00016.87
8.0.190.0000.00816.76
8.0.180.0060.00316.85
8.0.170.0080.00016.89
8.0.160.0050.00216.78
8.0.150.0040.00416.80
8.0.140.0000.00916.83
8.0.130.0070.00013.26
8.0.120.0050.00316.77
8.0.110.0000.00716.82
8.0.100.0050.00216.80
8.0.90.0040.00416.82
8.0.80.0070.00716.82
8.0.70.0040.00416.72
8.0.60.0000.00816.72
8.0.50.0080.00016.67
8.0.30.0130.01316.94
8.0.20.0080.01117.40
8.0.10.0040.00416.74
8.0.00.0120.00716.55
7.4.330.0000.00515.00
7.4.320.0030.00316.58
7.4.300.0060.00016.48
7.4.290.0070.00016.40
7.4.280.0000.00816.52
7.4.270.0090.00016.50
7.4.260.0000.00716.54
7.4.250.0050.00316.39
7.4.240.0020.00516.51
7.4.230.0000.00716.24
7.4.220.0070.01116.55
7.4.210.0080.01216.46
7.4.200.0020.00516.61
7.4.160.0160.00016.34
7.4.150.0110.01117.40
7.4.140.0100.01017.86
7.4.130.0110.00616.39
7.4.120.0090.01116.38
7.4.110.0110.00716.45
7.4.100.0100.00716.48
7.4.90.0090.01216.51
7.4.80.0100.01319.39
7.4.70.0130.00316.51
7.4.60.0140.00416.30
7.4.50.0030.00316.48
7.4.40.0070.01016.50
7.4.30.0030.01316.37
7.4.10.0090.00914.50
7.4.00.0030.01114.77
7.3.330.0000.00513.05
7.3.320.0030.00213.06
7.3.310.0050.00216.24
7.3.300.0000.00616.10
7.3.290.0080.01216.23
7.3.280.0060.01216.25
7.3.270.0090.00917.40
7.3.260.0090.00916.50
7.3.250.0060.01016.27
7.3.240.0120.01216.53
7.3.230.0060.01116.39
7.3.210.0030.01316.50
7.3.200.0090.01319.39
7.3.190.0060.01116.33
7.3.180.0160.00016.21
7.3.170.0030.01216.27
7.3.160.0100.01016.29
7.3.130.0140.00714.82
7.3.120.0030.01014.54
7.3.110.0070.00714.84
7.3.100.0130.00314.57
7.3.90.0100.00714.51
7.3.80.0060.00614.99
7.3.70.0000.01514.76
7.3.60.0000.01414.68
7.3.50.0120.00014.50
7.3.40.0000.01014.51
7.3.30.0060.00914.46
7.3.20.0060.00616.25
7.3.10.0090.00016.54
7.3.00.0100.00716.42
7.2.330.0120.00616.34
7.2.320.0140.00316.58
7.2.310.0160.00716.54
7.2.300.0070.01416.55
7.2.290.0090.00616.26
7.2.260.0110.01114.96
7.2.250.0000.01615.11
7.2.240.0090.00614.88
7.2.230.0000.01514.87
7.2.220.0000.01714.83
7.2.210.0060.00314.69
7.2.200.0070.00715.05
7.2.190.0080.00814.94
7.2.180.0070.00314.79
7.2.170.0040.01114.87
7.2.160.0030.01014.75
7.2.150.0110.00716.61
7.2.140.0080.00816.70
7.2.130.0000.01216.55
7.2.120.0060.01316.93
7.2.110.0070.01016.66
7.2.100.0000.01416.53
7.2.90.0040.00716.66
7.2.80.0030.01016.76
7.2.70.0070.00716.63
7.2.60.0060.00616.60
7.2.50.0030.00616.70
7.2.40.0080.00816.56
7.2.30.0120.00016.86
7.2.20.0120.00616.57
7.2.10.0070.00716.95
7.2.00.0060.00818.00
7.1.330.0040.01115.80
7.1.320.0040.01115.51
7.1.310.0090.00615.86
7.1.300.0030.01215.74
7.1.290.0000.01015.75
7.1.280.0060.00615.42
7.1.270.0030.01515.55
7.1.260.0070.00715.82
7.1.250.0090.00615.88
7.1.240.0100.00715.62
7.1.230.0040.00815.71
7.1.220.0000.01015.45
7.1.210.0080.00415.59
7.1.200.0030.00915.57
7.1.190.0060.00315.44
7.1.180.0030.01015.58
7.1.170.0030.01215.53
7.1.160.0060.00915.49
7.1.150.0090.00615.70
7.1.140.0110.00315.43
7.1.130.0070.00715.67
7.1.120.0000.01515.60
7.1.110.0130.00315.73
7.1.100.0030.01116.98
7.1.90.0000.01615.45
7.1.80.0030.01015.80
7.1.70.0020.01016.29
7.1.60.0070.01217.49
7.1.50.0050.01516.12
7.1.40.0060.00315.66
7.1.30.0040.00715.65
7.1.20.0060.00915.85
7.1.10.0100.00715.76
7.1.00.0030.04218.85
7.0.330.0090.00915.04
7.0.320.0060.00314.99
7.0.310.0070.00715.13
7.0.300.0060.00314.93
7.0.290.0000.01114.91
7.0.280.0080.00015.43
7.0.270.0000.01215.40
7.0.260.0080.00015.34
7.0.250.0060.00915.30
7.0.240.0090.00615.41
7.0.230.0040.00714.91
7.0.220.0030.00715.06
7.0.210.0090.00015.17
7.0.200.0040.00715.87
7.0.190.0070.00715.14
7.0.180.0000.01015.30
7.0.170.0030.00615.28
7.0.160.0030.01415.13
7.0.150.0080.00715.05
7.0.140.0100.03518.70
7.0.130.0040.01115.47
7.0.120.0040.01215.47
7.0.110.0080.00515.15
7.0.100.0200.04217.64
7.0.90.0270.04717.68
7.0.80.0260.02317.56
7.0.70.0300.04317.49
7.0.60.0250.04717.52
7.0.50.0270.02217.79
7.0.40.0080.03816.78
7.0.30.0080.04016.75
7.0.20.0050.03716.76
7.0.10.0060.04216.73
7.0.00.0080.04216.73
5.6.400.0070.00714.14
5.6.390.0060.01314.13
5.6.380.0090.00014.43
5.6.370.0100.00314.11
5.6.360.0000.01414.27
5.6.350.0030.00614.37
5.6.340.0070.01013.95
5.6.330.0040.01114.32
5.6.320.0030.01014.09
5.6.310.0030.00614.27
5.6.300.0100.00314.10
5.6.290.0030.00613.95
5.6.280.0040.04017.69
5.6.270.0030.00614.07
5.6.260.0040.00414.26
5.6.250.0070.04517.49
5.6.240.0070.04817.56
5.6.230.0080.04317.48
5.6.220.0050.03517.34
5.6.210.0030.04717.30
5.6.200.0110.04117.60
5.6.190.0070.04217.49
5.6.180.0070.04717.75
5.6.170.0070.04717.47
5.6.160.0050.04817.61
5.6.150.0100.02517.73
5.6.140.0080.04817.56
5.6.130.0050.04217.50
5.6.120.0080.04517.70
5.6.110.0110.04117.75
5.6.100.0110.04117.52
5.6.90.0080.04017.57
5.6.80.0070.04217.39
5.6.70.0080.04317.16
5.6.60.0090.04117.14
5.6.50.0050.02817.27
5.6.40.0070.04317.36
5.6.30.0070.04517.20
5.6.20.0020.03217.23
5.6.10.0090.04217.19
5.6.00.0080.04217.25
5.5.380.0070.04317.30
5.5.370.0100.04017.37
5.5.360.0080.04117.26
5.5.350.0040.04717.30
5.5.340.0050.04017.37
5.5.330.0050.04517.48
5.5.320.0080.04817.52
5.5.310.0020.05117.59
5.5.300.0030.05017.39
5.5.290.0050.05017.62
5.5.280.0030.04717.57
5.5.270.0080.04017.61
5.5.260.0080.04317.41
5.5.250.0060.03117.27
5.5.240.0090.03717.18
5.5.230.0080.03517.21
5.5.220.0080.02617.21
5.5.210.0030.04517.03
5.5.200.0070.04417.18
5.5.190.0080.04117.22
5.5.180.0090.03617.13
5.5.170.0000.01014.04
5.5.160.0100.02717.05
5.5.150.0070.04417.18
5.5.140.0100.04217.02
5.5.130.0050.04417.16
5.5.120.0050.04217.04
5.5.110.0100.04017.06
5.5.100.0070.02917.08
5.5.90.0050.03716.99
5.5.80.0100.04216.99
5.5.70.0120.03016.94
5.5.60.0050.04216.96
5.5.50.0070.03917.03
5.5.40.0090.03617.16
5.5.30.0070.03516.81
5.5.20.0070.03616.81
5.5.10.0120.03816.91
5.5.00.0100.03716.96
5.4.450.0080.04015.40
5.4.440.0050.02715.45
5.4.430.0070.03715.48
5.4.420.0080.04115.33
5.4.410.0060.03915.38
5.4.400.0030.04515.28
5.4.390.0100.03915.31
5.4.380.0030.04315.17
5.4.370.0080.03815.24
5.4.360.0100.03715.24
5.4.350.0050.04115.32
5.4.340.0080.02815.16
5.4.330.0040.00411.43
5.4.320.0030.04415.29
5.4.310.0080.04215.31
5.4.300.0100.03715.16
5.4.290.0050.04015.33
5.4.280.0030.04215.23
5.4.270.0060.04315.31
5.4.260.0100.03315.29
5.4.250.0060.03815.19
5.4.240.0080.03715.34
5.4.230.0060.04015.28
5.4.220.0030.04315.28
5.4.210.0120.03315.30
5.4.200.0100.02215.23
5.4.190.0030.04215.29
5.4.180.0070.03715.14
5.4.170.0080.03815.28
5.4.160.0050.03315.30
5.4.150.0070.02815.15
5.4.140.0030.02513.99
5.4.130.0090.03413.91
5.4.120.0030.04013.96
5.4.110.0120.03313.94
5.4.100.0090.03313.88
5.4.90.0080.03213.97
5.4.80.0070.03913.92
5.4.70.0040.04013.95
5.4.60.0050.04013.99
5.4.50.0100.03613.95
5.4.40.0080.03313.96
5.4.30.0070.02813.96
5.4.20.0100.03513.96
5.4.10.0080.03613.84
5.4.00.0050.03713.65
5.3.290.0070.07714.82
5.3.280.0100.07714.67
5.3.270.0070.08014.66
5.3.260.0000.05314.57
5.3.250.0100.07314.64
5.3.240.0070.08014.71
5.3.230.0000.08014.62
5.3.220.0030.07714.70
5.3.210.0070.07714.68
5.3.200.0100.06714.67
5.3.190.0070.07014.60
5.3.180.0070.04714.61
5.3.170.0070.05014.54
5.3.160.0070.07714.71
5.3.150.0170.06314.67
5.3.140.0000.07714.74
5.3.130.0100.07714.70
5.3.120.0130.07014.52
5.3.110.0030.08314.73
5.3.100.0100.06714.20
5.3.90.0100.04014.00
5.3.80.0100.07314.07
5.3.70.0070.07314.12
5.3.60.0030.04714.14
5.3.50.0070.07014.12
5.3.40.0030.07714.04
5.3.30.0130.06713.93
5.3.20.0030.06713.62
5.3.10.0070.07313.70
5.3.00.0130.06313.79
5.2.170.0070.06011.25
5.2.160.0100.04011.21
5.2.150.0070.06311.26
5.2.140.0100.05711.28
5.2.130.0070.03711.24
5.2.120.0070.04011.04
5.2.110.0030.06311.08
5.2.100.0070.04711.06
5.2.90.0070.06011.16
5.2.80.0070.06011.07
5.2.70.0030.06011.26
5.2.60.0070.04311.16
5.2.50.0130.05011.17
5.2.40.0030.06311.13
5.2.30.0070.05711.00
5.2.20.0070.05011.13
5.2.10.0070.06310.96
5.2.00.0030.06010.71
5.1.60.0100.0309.91
5.1.50.0100.04710.10
5.1.40.0130.04310.09
5.1.30.0070.05310.46
5.1.20.0030.04310.26
5.1.10.0070.05710.12
5.1.00.0070.05310.22
5.0.50.0030.0508.63
5.0.40.0030.0438.54
5.0.30.0070.0578.11
5.0.20.0000.0478.24
5.0.10.0030.0438.29
5.0.00.0070.0608.28
4.4.90.0030.0177.99
4.4.80.0070.0277.99
4.4.70.0030.0337.99
4.4.60.0000.0377.99
4.4.50.0070.0307.99
4.4.40.0000.0507.99
4.4.30.0070.0277.99
4.4.20.0000.0377.99
4.4.10.0070.0307.99
4.4.00.0000.0577.99
4.3.110.0000.0377.99
4.3.100.0070.0177.99
4.3.90.0000.0377.99
4.3.80.0070.0507.99
4.3.70.0070.0177.99
4.3.60.0000.0377.99
4.3.50.0030.0237.99
4.3.40.0070.0477.99
4.3.30.0000.0377.99
4.3.20.0000.0377.99
4.3.10.0000.0337.99
4.3.00.0030.0337.99

preferences:
40.65 ms | 400 KiB | 5 Q