3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); $sfid = ''; $sa = ''; $lo = ''; $ra = ''; $numrec = ''; try { $arrayleadurimap= array( "1274235@accela.3ccloud.com" => "Charles Brown", "1274271@accela.3ccloud.com" => "Chad Devero", "1274243@accela.3ccloud.com" => "Chantz Gnad", "1274247@accela.3ccloud.com" => "Chad Lee", "1274275@accela.3ccloud.com" => "Chris Meyn", "1274251@accela.3ccloud.com" => "Jared Borberg", "1274279@accela.3ccloud.com" => "Josh Holloway", "1274283@accela.3ccloud.com" => "Karon McGlinn", "1274287@accela.3ccloud.com" => "Michaell Wallace-Beaven", "1274291@accela.3ccloud.com" => "Matt Fisher", "1274255@accela.3ccloud.com" => "Martin Wehrenberg", "1274295@accela.3ccloud.com" => "Pam Castrey", "1274259@accela.3ccloud.com" => "Terrence Abney", "1274299@accela.3ccloud.com" => "Terence Gunn", "1274263@accela.3ccloud.com" => "Trey Sparks", "12742107@accela.3ccloud.com" => "Caleb Foreman", "12742111@accela.3ccloud.com" => "Greg Weber", "12742115@accela.3ccloud.com" => "Chris Kneedler", "12742119@accela.3ccloud.com" => "Ryan Haynes", "12742123@accela.3ccloud.com" => "Beau Bryan", "12742127@accela.3ccloud.com" => "Nancy Sisson" ); $username = $_GET["username"]; $password = $_GET["password"]; $number = $_GET["number"]; $url="https://login.salesforce.com/services/Soap/c/28.0/0DFd0000000HB01"; $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>". "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:tns=\"urn:enterprise.soap.sforce.com\">". "<soap:Header>". "<tns:LoginScopeHeader>". "<tns:organizationId/>". "</tns:LoginScopeHeader>". "</soap:Header>". "<soap:Body>". "<tns:login>". "<tns:username>".$username."</tns:username>". "<tns:password>".$password."</tns:password>". "</tns:login>". "</soap:Body>". "</soap:Envelope>"; $headers = array( 'Content-Type:text/xml; charset=utf-8', 'User-Agent:Webastra', 'SOAPAction:login', ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); $oXML = new SimpleXMLElement($result); $oXML->registerXPathNamespace('c', 'http://schemas.xmlsoap.org/soap/envelope/'); $oXML->registerXPathNamespace('f', 'urn:enterprise.soap.sforce.com'); $metadata1 = $oXML->xpath('//f:serverUrl'); $metadata2 = $oXML->xpath('//f:sessionId'); $serverurl = $metadata1[0]; $sessionid = $metadata2[0]; $to = $number; $len = strlen($number); if($len >= 10) { $to = sprintf("(%s) %s-%s", substr($number, 0, 3), substr($number, 3, 3), substr($number, 6)); } //search sfid $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?> <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:tns=\"urn:enterprise.soap.sforce.com\"> <soap:Header> <tns:SessionHeader> <tns:sessionId>".$sessionid."</tns:sessionId> </tns:SessionHeader> <tns:QueryOptions/> <tns:MruHeader> <tns:updateMru>true</tns:updateMru> </tns:MruHeader> <tns:PackageVersionHeader/> </soap:Header> <soap:Body> <tns:query> <tns:queryString>select Id,Stips_Agent__c,F9LO__c,Owner.Name,F9Retention_Agent__c from Lead where Phone like '%".$to."%' OR Phone like '%".$number."%'</tns:queryString> </tns:query> </soap:Body> </soap:Envelope>"; $headers = array( 'Content-Type:text/xml; charset=utf-8', 'User-Agent:Webastra', 'SOAPAction:""', ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $serverurl); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); $oXML = new SimpleXMLElement($result); $oXML->registerXPathNamespace('c', 'http://schemas.xmlsoap.org/soap/envelope/'); $oXML->registerXPathNamespace('d', 'urn:enterprise.soap.sforce.com'); $oXML->registerXPathNamespace('f', 'urn:sobject.enterprise.soap.sforce.com'); $metadata1 = $oXML->xpath('//f:Id'); $metadata2 = $oXML->xpath('//f:Stips_Agent__c'); $metadata3 = $oXML->xpath('//f:F9LO__c'); $metadata4 = $oXML->xpath('//f:F9Retention_Agent__c'); $sfid = $metadata1[0]; $sa = $metadata2[0]; $lo = $metadata3[0]; $ra = $metadata4[0]; $leadfield = ''; $agenturi=''; if(strlen($sfid) > 0) { if(strlen($ra) != 0) { $leadfield = $ra; } else if(strlen($sa) != 0) { $leadfield = $sa; } else if(strlen($lo) != 0) { $leadfield = $lo; } } if(strlen($leadfield) != 0) { while ($val1 = current($arrayleadurimap)) { if ($val1==$leadfield) { $agenturi = key($arrayleadurimap); break; } next($arrayleadurimap); } } if(strlen($agenturi) != 0) { print 'call='.$agenturi.',sfid='.$sfid; } else { print 'prom=,result='.$result; } } catch(Exception $e) { echo $e; } ob_flush(); ?>

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.0060.00918.61
8.3.50.0070.01316.73
8.3.40.0040.01118.92
8.3.30.0120.00318.93
8.3.20.0040.00418.97
8.3.10.0060.00318.76
8.3.00.0000.00919.25
8.2.180.0110.00418.42
8.2.170.0110.00722.96
8.2.160.0030.01419.08
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00319.13
8.2.110.0000.01021.04
8.2.100.0060.00618.03
8.2.90.0040.00418.16
8.2.80.0000.00818.17
8.2.70.0040.00418.15
8.2.60.0000.00818.34
8.2.50.0040.00418.10
8.2.40.0040.00422.15
8.2.30.0040.00419.52
8.2.20.0060.00417.93
8.2.10.0000.00817.86
8.2.00.0040.00417.88
8.1.280.0060.00925.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.83
8.1.230.0120.00022.63
8.1.220.0000.00917.88
8.1.210.0000.00818.77
8.1.200.0100.00217.48
8.1.190.0000.00917.50
8.1.180.0040.00418.10
8.1.170.0080.00018.63
8.1.160.0000.00719.03
8.1.150.0030.00519.04
8.1.140.0040.00417.58
8.1.130.0040.00417.65
8.1.120.0000.00717.61
8.1.110.0000.00717.57
8.1.100.0000.00717.50
8.1.90.0040.00417.65
8.1.80.0070.00017.56
8.1.70.0000.00717.51
8.1.60.0030.00717.77
8.1.50.0060.00317.50
8.1.40.0060.00317.69
8.1.30.0050.00317.83
8.1.20.0000.00817.66
8.1.10.0000.00817.72
8.1.00.0030.00517.63
8.0.300.0030.00521.51
8.0.290.0050.00316.88
8.0.280.0030.00318.66
8.0.270.0040.00417.27
8.0.260.0000.00816.89
8.0.250.0000.00817.13
8.0.240.0070.00016.99
8.0.230.0040.00417.20
8.0.220.0030.00317.00
8.0.210.0040.00417.10
8.0.200.0030.00317.17
8.0.190.0040.00417.15
8.0.180.0030.00717.14
8.0.170.0080.00016.99
8.0.160.0000.00717.07
8.0.150.0040.00416.95
8.0.140.0070.00417.09
8.0.130.0030.00313.48
8.0.120.0030.00516.95
8.0.110.0080.00016.89
8.0.100.0080.00017.13
8.0.90.0000.00917.04
8.0.80.0000.01517.08
8.0.70.0040.00416.98
8.0.60.0080.00016.93
8.0.50.0000.01017.06
8.0.30.0100.00717.08
8.0.20.0100.01217.13
8.0.10.0000.00717.28
8.0.00.0170.00516.86
7.4.330.0020.00213.20
7.4.320.0030.00316.75
7.4.300.0030.00316.65
7.4.290.0080.00016.64
7.4.280.0050.00216.63
7.4.270.0030.00316.75
7.4.260.0000.00513.45
7.4.250.0030.00616.68
7.4.240.0000.00816.65
7.4.230.0100.00016.52
7.4.220.0070.01116.60
7.4.210.0110.00416.59
7.4.200.0030.00616.68
7.4.190.0070.00016.51
7.4.160.0200.00016.85
7.4.150.0080.01116.57
7.4.140.0120.01216.84
7.4.130.0110.00916.71
7.4.120.0040.01316.61
7.4.110.0040.02116.73
7.4.100.0130.00716.55
7.4.90.0100.01316.62
7.4.80.0120.00619.39
7.4.70.0060.01316.47
7.4.60.0130.00616.55
7.4.50.0040.00416.39
7.4.40.0030.01316.69
7.4.30.0070.01116.71
7.4.10.0080.00915.23
7.4.00.0090.00715.10
7.3.330.0000.00713.36
7.3.320.0030.00313.21
7.3.310.0030.00316.46
7.3.300.0030.00316.52
7.3.290.0100.01016.53
7.3.280.0140.00916.55
7.3.270.0100.01016.49
7.3.260.0030.01516.58
7.3.250.0100.00816.59
7.3.240.0090.00916.68
7.3.230.0120.00616.70
7.3.210.0070.01016.58
7.3.200.0060.00916.57
7.3.190.0070.01316.70
7.3.180.0070.01016.63
7.3.170.0070.01316.61
7.3.160.0160.00816.59
7.3.130.0060.01215.03
7.3.120.0070.00915.02
7.3.110.0070.01014.95
7.3.100.0050.01014.96
7.3.90.0080.01015.08
7.3.80.0080.00414.93
7.3.70.0030.01114.88
7.3.60.0050.01014.94
7.3.50.0080.00914.95
7.3.40.0040.00814.94
7.3.30.0050.01014.92
7.3.20.0030.01016.67
7.3.10.0060.00816.64
7.3.00.0030.01016.68
7.2.330.0100.00716.57
7.2.320.0110.00716.79
7.2.310.0090.00916.55
7.2.300.0050.01116.84
7.2.290.0070.01416.59
7.2.260.0050.01215.02
7.2.250.0060.01215.08
7.2.240.0090.00715.16
7.2.230.0020.01315.06
7.2.220.0070.00915.14
7.2.210.0070.00714.98
7.2.200.0070.00715.23
7.2.190.0080.00915.13
7.2.180.0040.00815.23
7.2.170.0020.01015.13
7.2.160.0030.00915.02
7.2.150.0040.00916.78
7.2.140.0060.01016.86
7.2.130.0050.00916.92
7.2.120.0070.00816.92
7.2.110.0060.00716.85
7.2.100.0080.00817.01
7.2.90.0050.00916.79
7.2.80.0060.01016.92
7.2.70.0040.00816.66
7.2.60.0110.00716.87
7.2.50.0090.00516.83
7.2.40.0090.00416.94
7.2.30.0050.01016.72
7.2.20.0050.00917.02
7.2.10.0090.00616.95
7.2.00.0080.00617.48
7.1.330.0070.00815.89
7.1.320.0080.00615.64
7.1.310.0050.00715.86
7.1.300.0070.00815.70
7.1.290.0040.00815.72
7.1.280.0070.00415.61
7.1.270.0050.00715.76
7.1.260.0030.00915.76
7.1.250.0050.01215.68
7.1.240.0100.00315.59
7.1.230.0070.00615.66
7.1.220.0030.01215.74
7.1.210.0040.00615.79
7.1.200.0080.00515.65
7.1.190.0000.00915.94
7.1.180.0000.01315.56
7.1.170.0020.01215.67
7.1.160.0100.00415.51
7.1.150.0060.01115.64
7.1.140.0040.00715.86
7.1.130.0020.01215.77
7.1.120.0050.00715.63
7.1.110.0030.01115.61
7.1.100.0020.01215.54
7.1.90.0060.00915.68
7.1.80.0030.00815.76
7.1.70.0010.00716.17
7.1.60.0050.00916.86
7.1.50.0080.00816.08
7.1.40.0030.01215.77
7.1.30.0080.00815.69
7.1.20.0080.00415.67
7.1.10.0040.00815.68
7.1.00.0100.02517.92
7.0.330.0030.00915.40
7.0.320.0080.00615.43
7.0.310.0100.00415.40
7.0.300.0030.00915.34
7.0.290.0050.01015.19
7.0.280.0040.00915.30
7.0.270.0070.00715.22
7.0.260.0050.00815.39
7.0.250.0080.00415.22
7.0.240.0080.00815.42
7.0.230.0050.00715.27
7.0.220.0050.00615.52
7.0.210.0040.00915.19
7.0.200.0050.00915.80
7.0.190.0050.01015.19
7.0.180.0100.00715.28
7.0.170.0050.00915.40
7.0.160.0050.00515.31
7.0.150.0100.00315.43
7.0.140.0040.03217.67
7.0.130.0110.00315.42
7.0.120.0050.02417.54
7.0.110.0040.00915.25
7.0.100.0070.00715.25
7.0.90.0060.00615.21
7.0.80.0020.01215.33
7.0.70.0040.00615.27
7.0.60.0040.02216.87
7.0.50.0110.01416.29
7.0.40.0100.01415.68
7.0.30.0160.03115.70
7.0.20.0160.01715.56
7.0.10.0040.03015.72
7.0.00.0060.01915.61
5.6.400.0040.00814.34
5.6.390.0100.00514.26
5.6.380.0070.00614.27
5.6.370.0020.01414.43
5.6.360.0030.00714.57
5.6.350.0050.00914.37
5.6.340.0070.00314.55
5.6.330.0050.00714.45
5.6.320.0060.01014.67
5.6.310.0050.00814.38
5.6.300.0050.01014.46
5.6.290.0050.00614.61
5.6.280.0010.03216.58
5.6.270.0030.00814.21
5.6.260.0050.00714.29
5.6.250.0020.01414.40
5.6.240.0100.00514.42
5.6.230.0090.00514.60
5.6.220.0020.01014.55
5.6.210.0100.02716.55
5.6.200.0030.03615.73
5.6.190.0040.02016.51
5.6.180.0180.03116.37
5.6.170.0080.02316.29
5.6.160.0030.03916.33
5.6.150.0060.02515.53
5.6.140.0030.03415.70
5.6.130.0030.03615.67
5.6.120.0090.02816.56
5.6.110.0090.02816.62
5.6.100.0040.02516.65
5.6.90.0080.02816.57
5.6.80.0050.03316.29
5.6.70.0040.00714.35
5.6.60.0060.00814.44
5.6.50.0090.00414.33
5.6.40.0050.00414.40
5.6.30.0090.00614.25
5.6.20.0050.00614.32
5.6.10.0100.00114.29
5.6.00.0050.00614.17
5.5.380.0070.00814.14
5.5.370.0080.00214.28
5.5.360.0020.01514.56
5.5.350.0080.02516.38
5.5.340.0020.02515.33
5.5.330.0080.01816.22
5.5.320.0420.02016.35
5.5.310.0140.03016.31
5.5.300.0080.01615.38
5.5.290.0090.03315.41
5.5.280.0090.01916.63
5.5.270.0040.01816.63
5.5.260.0070.02816.51
5.5.250.0060.02516.32
5.5.240.0040.02716.30
5.5.230.0070.00414.03
5.5.220.0050.00814.29
5.5.210.0040.01014.29
5.5.200.0050.00714.34
5.5.190.0100.00614.23
5.5.180.0010.00913.91
5.5.170.0060.00914.38
5.5.160.0020.01014.29
5.5.150.0060.00914.10
5.5.140.0050.01314.36
5.5.130.0030.01014.37
5.5.120.0040.00914.32
5.5.110.0080.00614.11
5.5.100.0070.00614.38
5.5.90.0090.00414.05
5.5.80.0050.00914.26
5.5.70.0100.00214.35
5.5.60.0050.01114.16
5.5.50.0070.00714.30
5.5.40.0030.01314.03
5.5.30.0060.00614.32
5.5.20.0100.00514.01
5.5.10.0030.01114.40
5.5.00.0050.01014.21
5.4.450.0130.02213.88
5.4.440.0190.01913.72
5.4.430.0090.01913.89
5.4.420.0190.01813.84
5.4.410.0220.02213.77
5.4.400.0220.01413.60
5.4.390.0240.02013.73
5.4.380.0080.02013.67
5.4.370.0300.01613.77
5.4.360.0250.02113.64
5.4.350.0190.01413.55
5.4.340.0320.01513.73
5.4.330.0020.00510.88
5.4.320.0210.01713.56
5.4.310.0140.02413.67
5.4.300.0230.02013.59
5.4.290.0200.01813.71
5.4.280.0320.01813.56
5.4.270.0200.01613.55
5.4.260.0170.02013.73
5.4.250.0120.01613.63
5.4.240.0090.02213.69
5.4.230.0220.01313.52
5.4.220.0220.01613.59
5.4.210.0200.02013.64
5.4.200.0260.01213.48
5.4.190.0350.01413.80
5.4.180.0230.01913.74
5.4.170.0300.01813.75
5.4.160.0280.01813.48
5.4.150.0240.01613.52
5.4.140.0290.01312.80
5.4.130.0240.01612.78
5.4.120.0260.01412.90
5.4.110.0380.01312.91
5.4.100.0060.01912.84
5.4.90.0240.01712.77
5.4.80.0190.02112.71
5.4.70.0170.01912.75
5.4.60.0230.01412.82
5.4.50.0330.01412.81
5.4.40.0290.01312.81
5.4.30.0170.01312.82
5.4.20.0300.01812.79
5.4.10.0290.02612.81
5.4.00.0260.01412.62
5.3.290.0120.02112.13
5.3.280.0190.01612.12
5.3.270.0140.02212.13
5.3.260.0210.01812.12
5.3.250.0210.01612.12
5.3.240.0240.02112.12
5.3.230.0320.01412.12
5.3.220.0300.01312.12
5.3.210.0170.01612.12
5.3.200.0280.01612.12
5.3.190.0090.02112.12
5.3.180.0290.01712.15
5.3.170.0200.02212.17
5.3.160.0200.01512.15
5.3.150.0130.01112.16
5.3.140.0230.01612.13
5.3.130.0260.01712.12
5.3.120.0160.01612.12
5.3.110.0220.02012.12
5.3.100.0200.01312.12
5.3.90.0280.01712.20
5.3.80.0040.01212.12
5.3.70.0220.01612.12
5.3.60.0370.01412.12
5.3.50.0290.01912.13
5.3.40.0220.01412.13
5.3.30.0220.01412.12
5.3.20.0120.01912.12
5.3.10.0280.01512.12
5.3.00.0210.01612.12
5.2.170.0700.03015.14
5.2.160.0400.03315.14
5.2.150.0430.04015.14
5.2.140.0570.03015.14
5.2.130.0370.03315.14
5.2.120.0470.02715.14
5.2.110.0330.03015.14
5.2.100.0530.04015.14
5.2.90.0100.03715.14
5.2.80.0530.04015.14
5.2.70.0370.03715.14
5.2.60.0600.03715.14
5.2.50.0670.03015.14
5.2.40.0570.03015.14
5.2.30.0200.03715.14
5.2.20.0570.02715.14
5.2.10.0170.03015.14
5.2.00.0570.03715.14
5.1.60.0330.02015.14
5.1.50.0330.03015.14
5.1.40.0570.02315.14
5.1.30.0130.03315.14
5.1.20.0230.04015.14
5.1.10.0130.02715.14
5.1.00.0430.02015.14
5.0.50.0070.01315.14
5.0.40.0200.02015.14
5.0.30.0370.03315.14
5.0.20.0300.01315.13
5.0.10.0170.02315.13
5.0.00.0200.03015.13
4.4.90.0300.01315.14
4.4.80.0300.01715.14
4.4.70.0100.01315.14
4.4.60.0300.01315.14
4.4.50.0200.01315.14
4.4.40.0230.02715.14
4.4.30.0130.01315.14
4.4.20.0200.02015.14
4.4.10.0100.02015.14
4.4.00.0170.02315.14
4.3.110.0200.02015.14
4.3.100.0200.01315.13
4.3.90.0200.01015.13
4.3.80.0330.02315.13
4.3.70.0130.02015.13
4.3.60.0170.01015.13
4.3.50.0330.01315.13
4.3.40.0200.02715.13
4.3.30.0230.01015.13
4.3.20.0170.01315.13
4.3.10.0170.01715.13
4.3.00.0030.01715.13

preferences:
54.21 ms | 400 KiB | 5 Q