3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php // Extends SoapClient (PHP native) for EMS authentication process class SoapClientEMS extends SoapClient { const EMS_WS_NAMESPACE = 'http://ws.ems6.net/'; function SoapClientEMS($Login, $Password, $Idmlist, $wsdl, $options = array()) { parent::__construct($wsdl, $options); $this->__setSoapHeaders($this->createHeader($Login, $Password, $Idmlist)); } private function createHeader($Login, $Password, $Idmlist) { @$struct->UserName = new SoapVar($Login, XSD_STRING, null, null, null, self::EMS_WS_NAMESPACE); $struct->Password = new SoapVar($Password, XSD_STRING, null, null, null, self::EMS_WS_NAMESPACE); $struct->IdMlist = new SoapVar($Idmlist, XSD_INTEGER, null, null, null, self::EMS_WS_NAMESPACE); $header_values = new SoapVar($struct, SOAP_ENC_OBJECT, null, null,null, self::EMS_WS_NAMESPACE); $header = new SoapHeader(self::EMS_WS_NAMESPACE, "AuthHeader", $header_values); return $header; } } // declare variables for soap authentication // API LOGIN $Login = 'Email_API'; // API SECRET $Pwd = 'i8piZZa4u'; // DATABASE $Idmlist = '2093191961'; $mySegment = new SoapClientEMS( $Login, $Pwd, $Idmlist, "https://api.cheetahmail.fr/v1/segment.asmx?WSDL", $Options = array()); // WebMethod call $result = $mySegment->ListSegment(); //Affichage du Results brut if(isset($result->ListSegmentResult->string)){ if(count($result->ListSegmentResult->string) == 1){ echo $result->ListSegmentResult->string; } else{ foreach ($result->ListSegmentResult->string as $segment) { echo $segment; } } } ?>

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.0.20.0330.07320.06
7.0.10.0100.08320.19
7.0.00.0030.08320.10
5.6.170.0270.09020.58
5.6.160.0000.07320.51
5.6.150.0100.07718.23
5.6.140.0070.04018.14
5.6.130.0030.04318.18
5.6.120.0100.08320.89
5.6.110.0100.06320.97
5.6.100.0170.07320.97
5.6.90.0070.08320.99
5.6.80.0000.04320.28
5.5.310.0400.06720.35
5.5.300.0100.06718.02
5.5.290.0070.07717.98
5.5.280.0030.06020.73
5.5.270.0170.07320.64
5.5.260.0030.05020.84
5.5.250.0170.06720.57
5.5.240.0030.07720.21

preferences:
137.15 ms | 1394 KiB | 7 Q