3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('display_errors', 1); error_reporting(E_ALL); /** Be sure you've both PEAR installed on your web server and that all the required PEAR modules have been installed */ if(!extension_loaded("soap")){ dl("php_soap.dll"); } ini_set("consultar.wsdl_cache_enabled","0"); $server = new SoapServer("consultar.wsdl"); function consultar(){ //aqui vamos a llamar a mysql /* $servername = "localhost"; $username = "dragonfly"; $password = "jorangamo_15"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully";*/ return "hola"; } $server->AddFunction("consultar"); $server->handle(); echo "si"; ?>
based on 3XPDp
Output for 7.0.0 - 7.2.0
Warning: dl(): Dynamically loaded extensions aren't enabled in /in/CuhDb on line 11 Fatal error: Uncaught Error: Class 'SoapServer' not found in /in/CuhDb:15 Stack trace: #0 {main} thrown in /in/CuhDb on line 15
Process exited with code 255.
Output for 5.4.1 - 5.6.28
Warning: dl(): Dynamically loaded extensions aren't enabled in /in/CuhDb on line 11 Fatal error: Class 'SoapServer' not found in /in/CuhDb on line 15
Process exited with code 255.
Output for 5.3.18 - 5.3.29
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>WSDL</faultcode><faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from 'consultar.wsdl' : failed to load external entity "consultar.wsdl" </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Process exited with code 255.