3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = array('trace' => 1, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_MEMORY, 'soap_version' => SOAP_1_2); $urlTimbrado = 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'; $varUsuario = 'prueba'; $varContrasena = 'prueba'; $varDocumentoFactura = 'Id:1;TipoDescuento:Porcentaje;PrecioPreferente:Precio1;Version:3.2;Serie:FA;Folio:16;Fecha:2016-01-06T11:05:27;FormaDePago:PAGO EN UNA SOLA EXHIBICION;CondicionesDePago:CONTADO;Subtotal:693.99;Descuento:0;TipoCambio:1;Moneda:MXN;Total:805.03;TipoDeComprobante:ingreso;RfcEmisor:AAA010101AAA;RazonSocialEmisor:Empresa de Prueba;CalleEmisor:Benito Juarez;MunicipioEmisor:TEPATITLAN;EstadoEmisor:JALISCO;PaisEmisor:MEXICO;CodigoPostalEmisor:47600;RfcReceptor:XAXX010101000;RazonSocialReceptor:Prueba;TotalImpuestosRetenidos:0;TotalImpuestosTrasladados:111.04;LugarExpedicion:TEPATITLAN, DE MORELO;RegimenFiscal:Regimen de Incorporacion Fiscal;NombreEmpresaReceptor:Prueba;EstadoDocumento:Prueba;PaisReceptor:MEXICO;PaisExpedidoEn:MEXICO;MetodoDePago:No identificado;Certificado:'; $varDesgloseFactura = 'Id:1;IdArticulo:0;IdDocumento:1;Cantidad:10;UnidadMedida:PIEZA;Descripcion:PAQ DE HOJA DE HOJA DE 500;ValorUnitario:44.83;ParteCantidad:0;ParteValorUnitario:0;Descuento:0;Ieps:0;Iva:16;Retencion:0;Isr:0;SubImporte:448.3;Descuentos:0;Importe:448.3;IepsTotal:0;IvaTotal:71.73;RetencionTotal:0;IsrTotal:0;Total:520.03;PrecioPublico:0'; try { $timbrado = new SoapClient($urlTimbrado, $options); $timbrarDatos = array('Usuario' => $varUsuario, 'Contrasena' => $varContrasena, 'DocumentoFactura' => $varDocumentoFactura, 'DesgloseFactura' => $varDesgloseFactura); $result = $timbrado->generacfdiv2($timbrarDatos)->generacfdiv2Result; header("Cache-control: private"); header("Content-Type: application/x-zip-compressed"); header("Content-Disposition: filename=cfdi.zip"); echo ($result); } catch(SoapFault $e) { echo $e->faultstring; }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "WSDL_CACHE_MEMORY" in /in/lGqka:5 Stack trace: #0 {main} thrown in /in/lGqka on line 5
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' (this will throw an Error in a future version of PHP) in /in/lGqka on line 5 Warning: Use of undefined constant SOAP_1_2 - assumed 'SOAP_1_2' (this will throw an Error in a future version of PHP) in /in/lGqka on line 5 Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/lGqka:15 Stack trace: #0 {main} thrown in /in/lGqka on line 15
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Notice: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' in /in/lGqka on line 5 Notice: Use of undefined constant SOAP_1_2 - assumed 'SOAP_1_2' in /in/lGqka on line 5 Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/lGqka:15 Stack trace: #0 {main} thrown in /in/lGqka on line 15
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Notice: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' in /in/lGqka on line 5 Notice: Use of undefined constant SOAP_1_2 - assumed 'SOAP_1_2' in /in/lGqka on line 5 Fatal error: Class 'SoapClient' not found in /in/lGqka on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.29
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL' : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL"
Process exited with code 255.
Output for 5.2.7 - 5.2.17
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::SoapClient(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL' : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL"
Process exited with code 255.
Output for 5.2.6
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::SoapClient(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Process exited with code 255.
Output for 5.2.0 - 5.2.5
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::SoapClient(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: Connection refused in /in/lGqka on line 15 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Process exited with code 255.
Output for 5.1.5 - 5.1.6
Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::__construct(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: Connection refused in /in/lGqka on line 15 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Process exited with code 255.
Output for 5.1.0 - 5.1.4
Notice: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' in /in/lGqka on line 5 Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::__construct(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: Connection refused in /in/lGqka on line 15 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' in /in/lGqka on line 5 Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: System error in /in/lGqka on line 15 Warning: SoapClient::__construct(http://opravyt.com/g12_0/opravycfdi.asmx?WSDL): failed to open stream: Connection refused in /in/lGqka on line 15 Warning: connection refusedI/O warning : failed to load external entity "http://opravyt.com/g12_0/opravycfdi.asmx?WSDL" in /in/lGqka on line 15 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Use of undefined constant WSDL_CACHE_MEMORY - assumed 'WSDL_CACHE_MEMORY' in /in/lGqka on line 5 SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://opravyt.com/g12_0/opravycfdi.asmx?WSDL'
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/lGqka on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected '{' in /in/lGqka on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/lGqka on line 14
Process exited with code 255.

preferences:
342.4 ms | 401 KiB | 451 Q