3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * SoapClient with protection on fatal error * * @category Smile * @package Smile_Soap * @author Laurent MINGUET <lamin@smile.fr> * @copyright 2014 Smile * */ class Smile_Soap_Client extends SoapClient { /** * construct * * @param string $wsdl wsdl url to use * @param array $options table of options * * @return $this * * @link http://www.php.net/manual/en/soapclient.soapclient.php */ public function __construct($wsdl = null, $options = array()) { $options = $this->_initOptions($options); self::startErrorHandlerForFatal('WSDL'); $res = @parent::__construct($wsdl, $options); self::stopErrorHandlerForFatal(); return $res; } /** * init the options * * @param array $options array of options * * @return array */ protected function _initOptions($options) { $defaultOptions = array( 'soap_version' => SOAP_1_1, 'authentication' => SOAP_AUTHENTICATION_BASIC, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'exceptions' => true, 'timeout' => (int)ini_get('default_socket_timeout'), // in seconds ); $options = array_merge($defaultOptions, $options); ini_set('default_socket_timeout', (int)$options['timeout']); return $options; } /****************************************************************** *********** METHODES AND PROPERTIES FOR ERROR HANDLING *********** ******************************************************************/ /** * default code to use for error handling * @var null|string */ static private $_defaultCode = null; /** * start handling the error to catch fatal errors * * @param string $defaultCode default code to use * * @return void */ static public function startErrorHandlerForFatal($defaultCode) { self::$_defaultCode = $defaultCode; set_error_handler('Smile_Soap_Client::errorHandlerForFatal', E_ALL); } /** * stop handling the error to catch fatal errors * * @return void */ static public function stopErrorHandlerForFatal() { self::$_defaultCode = null; restore_error_handler(); } /** * handling the error to catch fatal errors * * @param int $errno error number * @param string|exception $errstr error message * @param string $errfile file of the error * @param int $errline line of the error * * @return void * @throws SoapFault */ static public function errorHandlerForFatal($errno, $errstr, $errfile = null, $errline = null) { $code = self::$_defaultCode; self::stopErrorHandlerForFatal(); if ($errstr instanceof Exception) { if ($errstr->getCode()) { $code = $errstr->getCode(); } $errstr = $errstr->getMessage(); } elseif (!is_string($errstr)) { $errstr = 'Unknown error'; } throw new SoapFault($code, $errstr.' (error ['.$errno.'])'); } } try { $client = new Smile_Soap_Client(); echo '---===[OK]===---'."\n"; } catch (Exception $e) { echo '---===[ERROR]===---'."\n"; print_r($e); }

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.40.0110.00718.97
8.3.30.0150.00019.13
8.3.20.0000.00720.21
8.3.10.0030.00523.54
8.3.00.0080.00019.25
8.2.170.0090.00622.96
8.2.160.0070.00720.57
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0030.00522.13
8.2.110.0060.00322.24
8.2.100.0000.01117.78
8.2.90.0040.00419.08
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0060.00317.91
8.2.50.0030.00618.07
8.2.40.0030.00619.88
8.2.30.0040.00418.11
8.2.20.0000.00817.84
8.2.10.0000.00919.72
8.2.00.0030.00717.82
8.1.270.0040.00422.00
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00023.64
8.1.230.0070.00419.14
8.1.220.0000.00817.74
8.1.210.0050.00518.77
8.1.200.0040.00417.23
8.1.190.0000.00817.51
8.1.180.0060.00318.10
8.1.170.0040.00418.64
8.1.160.0040.00422.04
8.1.150.0000.00818.55
8.1.140.0090.00017.46
8.1.130.0000.00717.34
8.1.120.0040.00317.27
8.1.110.0060.00317.32
8.1.100.0030.00617.48
8.1.90.0000.00717.40
8.1.80.0000.00717.45
8.1.70.0000.00717.39
8.1.60.0040.00417.52
8.1.50.0000.00817.52
8.1.40.0030.00617.38
8.1.30.0060.00317.48
8.1.20.0040.00417.64
8.1.10.0040.00417.57
8.1.00.0000.00717.43
8.0.300.0000.00820.73
8.0.290.0070.00017.05
8.0.280.0040.00418.52
8.0.270.0000.00717.25
8.0.260.0030.00316.91
8.0.250.0080.00016.93
8.0.240.0000.00817.13
8.0.230.0030.00317.01
8.0.220.0000.00717.00
8.0.210.0000.00717.00
8.0.200.0000.00717.01
8.0.190.0030.00516.93
8.0.180.0000.00816.89
8.0.170.0040.00417.02
8.0.160.0040.00417.07
8.0.150.0000.00716.91
8.0.140.0080.00016.96
8.0.130.0000.00613.42
8.0.120.0000.00717.04
8.0.110.0000.00816.88
8.0.100.0040.00417.05
8.0.90.0040.00416.79
8.0.80.0090.00617.03
8.0.70.0000.00716.89
8.0.60.0000.00816.98
8.0.50.0080.00016.85
8.0.30.0110.00817.08
8.0.20.0090.01017.40
8.0.10.0040.00416.82
8.0.00.0160.00216.80
7.4.330.0000.00515.08
7.4.320.0040.00416.58
7.4.300.0000.00716.41
7.4.290.0000.00716.43
7.4.280.0050.00316.39
7.4.270.0040.00416.58
7.4.260.0000.00816.61
7.4.250.0000.00716.55
7.4.240.0020.00516.54
7.4.230.0000.00816.56
7.4.220.0040.01416.61
7.4.210.0060.00916.59
7.4.200.0080.00016.64
7.4.190.0040.00416.53
7.4.160.0070.01016.37
7.4.150.0140.00417.40
7.4.140.0070.01217.86
7.4.130.0140.00516.46
7.4.120.0110.00616.41
7.4.110.0140.00916.51
7.4.100.0160.00616.46
7.4.90.0060.01016.64
7.4.80.0030.01619.39
7.4.70.0060.01016.40
7.4.60.0060.01016.64
7.4.50.0000.00816.70
7.4.40.0060.00922.77
7.4.30.0080.00816.58
7.4.10.0110.00714.89
7.4.00.0080.00814.97
7.3.330.0030.00313.21
7.3.320.0070.00013.20
7.3.310.0000.00716.34
7.3.300.0000.00716.28
7.3.290.0030.01216.28
7.3.280.0040.01316.36
7.3.270.0140.00317.40
7.3.260.0140.00416.51
7.3.250.0110.00716.33
7.3.240.0080.01216.47
7.3.230.0030.01416.43
7.3.210.0100.00716.31
7.3.200.0060.01519.39
7.3.190.0110.01216.39
7.3.180.0100.00716.44
7.3.170.0160.00616.48
7.3.160.0060.00916.45
7.3.130.0030.01215.03
7.3.120.0080.00814.81
7.3.110.0100.00714.66
7.3.100.0030.01514.98
7.3.90.0120.00314.52
7.3.80.0030.00915.03
7.3.70.0070.00714.81
7.3.60.0070.00714.93
7.3.50.0030.00614.61
7.3.40.0070.01114.92
7.3.30.0070.01014.83
7.3.20.0030.00916.64
7.3.10.0070.00716.28
7.3.00.0100.00016.36
7.2.330.0100.00716.43
7.2.320.0090.00916.58
7.2.310.0100.01416.62
7.2.300.0170.00316.36
7.2.290.0070.01016.41
7.2.260.0090.01214.52
7.2.250.0090.01214.72
7.2.240.0040.01115.14
7.2.230.0080.00814.74
7.2.220.0060.00914.86
7.2.210.0060.00314.80
7.2.200.0000.01514.97
7.2.190.0130.00014.88
7.2.180.0070.00714.83
7.2.170.0060.00615.08
7.2.160.0040.01114.95
7.2.150.0090.00616.83
7.2.140.0060.00916.79
7.2.130.0060.00916.46
7.2.120.0100.01016.66
7.2.110.0000.01316.78
7.2.100.0040.01116.87
7.2.90.0100.01017.00
7.2.80.0040.01116.96
7.2.70.0030.01516.54
7.2.60.0030.01016.73
7.2.50.0090.00616.69
7.2.40.0040.01117.04
7.2.30.0040.01416.45
7.2.20.0000.01416.87
7.2.10.0060.01016.79
7.2.00.0060.00616.72
7.1.330.0090.00615.84
7.1.320.0090.00615.68
7.1.310.0130.00015.71
7.1.300.0030.00815.61
7.1.290.0140.00015.52
7.1.280.0070.00315.80
7.1.270.0070.00715.38
7.1.260.0060.00915.87
7.1.250.0080.00815.61
7.1.240.0060.01215.59
7.1.230.0000.01315.71
7.1.220.0110.00415.51
7.1.210.0060.00615.63
7.1.200.0030.01215.69
7.1.190.0100.00015.55
7.1.180.0050.00815.69
7.1.170.0090.00615.59
7.1.160.0130.00015.54
7.1.150.0040.00715.83
7.1.140.0100.00315.78
7.1.130.0100.00715.78
7.1.120.0040.00815.41
7.1.110.0000.01515.75
7.1.100.0040.00815.82
7.1.90.0030.00715.66
7.1.80.0070.00715.42
7.1.70.0080.00416.35
7.1.60.0070.01217.50
7.1.50.0050.00916.05
7.1.40.0000.01215.40
7.1.30.0040.00415.57
7.1.20.0030.01315.75
7.1.10.0050.00815.74
7.1.00.0050.03818.83
7.0.330.0040.01215.27
7.0.320.0060.00915.25
7.0.310.0040.01115.36
7.0.300.0060.00615.46
7.0.290.0040.01115.40
7.0.280.0030.00915.14
7.0.270.0000.01014.93
7.0.260.0090.00415.44
7.0.250.0030.01115.04
7.0.240.0030.01015.05
7.0.230.0000.00815.16
7.0.220.0000.01415.50
7.0.210.0040.00815.03
7.0.200.0130.00414.98
7.0.190.0050.00515.10
7.0.180.0070.00315.18
7.0.170.0090.00315.01
7.0.160.0040.00715.41
7.0.150.0060.00315.24
7.0.140.0020.04318.62
7.0.130.0080.00315.18
7.0.120.0060.00615.50
7.0.110.0030.01015.42
7.0.100.0090.00615.38
7.0.90.0040.01115.45
7.0.80.0030.01015.35
7.0.70.0140.00015.48
7.0.60.0070.02217.65
7.0.50.0050.03516.74
7.0.40.0100.04316.68
7.0.30.0170.03916.70
7.0.20.0170.04216.77
7.0.10.0050.02816.86
7.0.00.0100.02316.85
5.6.400.0090.00314.18
5.6.390.0060.01014.36
5.6.380.0070.01014.30
5.6.370.0070.00714.27
5.6.360.0090.00614.45
5.6.350.0040.00714.18
5.6.340.0030.01014.37
5.6.330.0040.00714.39
5.6.320.0030.00614.28
5.6.310.0030.01314.07
5.6.300.0100.00314.63
5.6.290.0070.00714.45
5.6.280.0020.04517.76
5.6.270.0000.01414.14
5.6.260.0040.00714.28
5.6.250.0030.00714.08
5.6.240.0060.00314.10
5.6.230.0070.00414.20
5.6.220.0040.01114.45
5.6.210.0090.02117.39
5.6.200.0080.04316.16
5.6.190.0060.04117.53
5.6.180.0100.03517.19
5.6.170.0200.04017.35
5.6.160.0050.02417.35
5.6.150.0050.02216.14
5.6.140.0090.02216.27
5.6.130.0030.02616.17
5.6.120.0020.02817.75
5.6.110.0020.05217.69
5.6.100.0080.03417.56
5.6.90.0120.01517.61
5.6.80.0050.03317.29
5.6.70.2200.02617.29
5.6.60.0040.01114.20
5.6.50.0030.00614.23
5.6.40.0070.00714.07
5.6.30.0070.01014.05
5.6.20.0050.00514.09
5.6.10.0040.01114.25
5.6.00.0000.01214.21
5.5.380.0090.00313.86
5.5.370.0100.00314.34
5.5.360.0000.01014.00
5.5.350.0120.04917.26
5.5.340.0070.04416.18
5.5.330.0060.02317.25
5.5.320.0170.02917.16
5.5.310.0130.04417.29
5.5.300.0050.02516.15
5.5.290.0060.02515.89
5.5.280.0080.03217.50
5.5.270.0090.04117.53
5.5.260.0080.04417.46
5.5.250.0070.03917.21
5.5.240.0170.04017.23
5.5.230.0060.00913.90
5.5.220.0040.01213.67
5.5.210.0060.00514.23
5.5.200.0000.01814.09
5.5.190.0030.01013.83
5.5.180.0040.01114.21
5.5.170.0000.01413.98
5.5.160.0030.01414.11
5.5.150.0040.01114.05
5.5.140.0040.01114.07
5.5.130.0100.00613.91
5.5.120.0030.00714.23
5.5.110.0040.01113.96
5.5.100.0090.00613.95
5.5.90.0080.00814.13
5.5.80.0070.00314.13
5.5.70.0080.00613.96
5.5.60.0040.01214.13
5.5.50.0060.00613.88
5.5.40.0090.00614.11
5.5.30.0070.01014.09
5.5.20.0060.01013.96
5.5.10.0150.00013.79
5.5.00.0060.00914.01
5.4.450.0430.03315.96
5.4.440.0430.03315.79
5.4.430.0400.03616.03
5.4.420.0250.03615.96
5.4.410.0350.03315.94
5.4.400.0470.02615.79
5.4.390.0200.03215.87
5.4.380.0220.02615.47
5.4.370.0150.03015.58
5.4.360.0180.03215.46
5.4.350.0170.03115.60
5.4.340.0170.03215.45
5.4.330.0030.00612.43
5.4.320.0090.02312.47
5.4.310.0060.02212.47
5.4.300.0080.02112.47
5.4.290.0050.02312.46
5.4.280.0040.02112.41
5.4.270.0080.02212.42
5.4.260.0080.02212.41
5.4.250.0070.02212.41
5.4.240.0070.02212.42
5.4.230.0080.01912.41
5.4.220.0040.02212.41
5.4.210.0080.01912.41
5.4.200.0060.02412.41
5.4.190.0050.02112.41
5.4.180.0060.02212.41
5.4.170.0040.02412.42
5.4.160.0050.02312.41
5.4.150.0060.02112.41
5.4.140.0080.01812.25
5.4.130.0070.02112.25
5.4.120.0050.02412.22
5.4.110.0040.02312.22
5.4.100.0060.02112.22
5.4.90.0050.02512.22
5.4.80.0070.02512.22
5.4.70.0090.02612.22
5.4.60.0060.02212.22
5.4.50.0040.02712.22
5.4.40.0060.02112.21
5.4.30.0050.02012.21
5.4.20.0060.02212.21
5.4.10.0070.01812.21
5.4.00.0040.02311.96
5.3.290.0120.02012.62
5.3.280.0100.02012.57
5.3.270.0070.02212.58
5.3.260.0070.02812.57
5.3.250.0100.02512.57
5.3.240.0090.03112.58
5.3.230.0090.02312.57
5.3.220.0030.02712.55
5.3.210.0050.02212.55
5.3.200.0100.02212.56
5.3.190.0070.02012.55
5.3.180.0070.02012.55
5.3.170.0050.02312.55
5.3.160.0060.02112.55
5.3.150.0060.02012.55
5.3.140.0050.02212.54
5.3.130.0050.02112.54
5.3.120.0040.02512.54
5.3.110.0050.02512.54
5.3.100.0040.02712.28
5.3.90.0060.02012.28
5.3.80.0040.02112.27
5.3.70.0050.02212.27
5.3.60.0070.02112.27
5.3.50.0030.02812.24
5.3.40.0060.02212.24
5.3.30.0070.03212.22
5.3.20.0080.02912.11
5.3.10.0080.02112.09
5.3.00.0050.02012.08
5.2.170.0040.0379.25
5.2.160.0080.0289.25
5.2.150.0050.0329.25
5.2.140.0070.0319.25
5.2.130.0060.0299.21
5.2.120.0090.0259.20
5.2.110.0060.0299.21
5.2.100.0060.0279.21
5.2.90.0080.0279.21
5.2.80.0090.0289.21
5.2.70.0080.0289.20
5.2.60.0020.0409.16
5.2.50.0090.0429.13
5.2.40.0060.0319.10
5.2.30.0070.0319.08
5.2.20.0060.0319.06
5.2.10.0050.0288.97
5.2.00.0070.0288.84
5.1.60.0050.0268.11
5.1.50.0050.0268.11
5.1.40.0070.0248.09
5.1.30.0090.0238.45
5.1.20.0070.0258.47
5.1.10.0060.0268.19
5.1.00.0060.0248.19
5.0.50.0080.0176.67
5.0.40.0050.0186.48
5.0.30.0020.0346.43
5.0.20.0040.0196.40
5.0.10.0010.0256.38
5.0.00.0050.0296.36
4.4.90.0040.0144.78
4.4.80.0010.0174.75
4.4.70.0020.0164.75
4.4.60.0030.0154.76
4.4.50.0010.0164.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0020.0164.85
4.4.10.0050.0134.84
4.4.00.0020.0264.76
4.3.110.0030.0154.67
4.3.100.0030.0154.66
4.3.90.0010.0164.63
4.3.80.0030.0244.58
4.3.70.0020.0154.63
4.3.60.0060.0114.63
4.3.50.0030.0154.63
4.3.40.0020.0244.54
4.3.30.0020.0153.30
4.3.20.0010.0163.28
4.3.10.0010.0163.23
4.3.00.0130.01710.53

preferences:
37.04 ms | 400 KiB | 5 Q