3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Basis für die beteiligten Übersetzer an einem Text class Translator { public $code; public $firstName; public $surName; public $cardNumber; public function __construct($code, $firstName, $surName, $cardNumber){ $this->firstName = $firstName; $this->surName = $surName; $this->cardNumber = $cardNumber; } } // Basis für die Autoren eines zu meldenen Textes class Author { public $code; public $firstName; public $surName; public $cardNumber; public function __construct($firstName, $surName, $cardNumber){ $this->firstName = $firstName; $this->surName = $surName; $this->cardNumber = $cardNumber; } } // Basis für die vollständige Meldung an die VGWort class Note { public $pixel_privId; public $shorttext; public $fulltext; public $text_isLyric; public $text_isRestricted; public $webranges; public function __construct($privId, $shorttext, $fulltext, $text_isLyric, $text_isRestricted, $webranges){ $this->pixel_privId = $privId; $this->shorttext = $shorttext; $this->fulltext = $fulltext; $this->text_isLyric = $text_isLyric; $this->text_isRestricted = $text_isRestricted; $this->webranges = $webranges; } } class NoteHandling extends SoapClient{ // Client connection private $client_options; private $wsdl; private $client; function __construct(){ $this->client_options = array('login' => 'SlevogtE', 'password' => 'BBDEXI', 'trace' => 1, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS); $this->wsdl = 'https://' . $this->client_options['login'] . ':' . $this->client_options['password'] . '@tom.vgwort.de/services/1.3/messageService.wsdl' ; $this->client = new SoapClient($this->wsdl, $this->client_options); } public function createNote(Note $note, Author $author){ /* $params = new StdClass(); $params->privateidentificationid = $note->pixel_privId; $params->parties = new StdClass(); $params->parties->authors = new StdClass(); $params->parties->authors->author = $author; $params->messageText = new StdClass(); $params->messageText->shorttext = $note->shorttext; $params->messageText->text = new StdClass(); $params->messageText->text->plainText = $note->fulltext; $params->webranges = new StdClass(); $params->webranges->webrange = new StdClass(); $params->webranges->webrange->url = $note->webranges; */ $params = array('privateidentificationid' => $note->pixel_privId, 'parties' => array('authors' => array( 'author' => array( 'code' => $author->code, 'firstName' => $author->firstName, 'surName' => $author->surName, 'cardNumber' => $author->cardNumber) ) ), 'messagetext' => array( 'lyric' => $note->text_isLyric, 'accessRestricted' => $note->text_isRestricted, 'shorttext' => $note->shorttext, 'text' => array( 'plainText' => $note->fulltext ) ), 'webranges' => array( 'webrange' => array( 'url' => $note->webranges ) ) ); try{ $result = $this->client->newMessage($params); echo "Antwort: ", $result->status; } catch(SoapFault $e){ echo "Fehlercode: " . $e->errorcode . "\n"; echo "Message: " . $e->errormsg . "\n"; } } } // Basis für die Informationen für ein Zählpixel class Pixel { public $orderDateTime; public $domain; public $publId; public $privId; } // Handler um Zählmarken zu bestellen class PixelHandling extends SoapClient{ // Client connection private $client_options; private $wsdl; private $client; function __construct(){ $this->client_options = array('login' => 'SlevogtE', 'password' => 'BBDEXI', 'trace' => 1, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS); $this->wsdl = 'https://' . $this->client_options['login'] . ':' . $this->client_options['password'] . '@tom-test.vgwort.de/services/1.0/pixelService.wsdl' ; $this->client = new SoapClient($this->wsdl, $this->client_options); } // Order Pixel (amount) --> pixels are being return in array ($arr) public function orderNewPixel($amount){ $params = new StdClass(); $params->count = $amount; $arr = array(); try{ $result = $this->client->orderPixel($params); $domain = $result->domain; $orderTime = $result->orderDateTime; foreach($result->pixels->pixel as $val){ $pixels = new Pixel(); $pixels->orderDateTime = $orderTime; $pixels->domain = $domain; $pixels->publId = $val->publicIdentificationId; $pixels->privId = $val->privateIdentificationId; array_push($arr, $pixels); } } catch(SoapFault $e){ echo "Fehlercode: " . $e->errorcode . "\n"; echo "Message: " . $e->errormsg . "\n"; echo "Folgende Anzahl waere moeglich gewesen: " . $e->maxOrder . "\n"; } return $arr; } } // Check whether Soap can be even used.. if(!class_exists('SoapClient')){ echo '<script type="text/javascript" language="Javascript">alert("Fehler: PHP-Modul fehlt.")</script>'; } $pixel = new PixelHandling(); $pixel->orderNewPixel(1); var_dump($pixel); $short = 'Theater und Internet - Eine historische Expedition in die Tiefen des www.'; $full = 'Könnte Lara Croft die Ophelia spielen? von Esther Slevogt November 2001. Das Theater ist groß, und in schlechtem Zustand. Wie man hineinkommt, ist nicht auf Anhieb zu erkennen. Auch die letzte Premieren-Ankündigung wirkt ziemlich veraltet. Der Aphra-Behn Theaterkomplex, von dem hier die Rede ist, gehört zum enormen Tagungsgeländes der Association for Theatre in Higher Education (ATHE), und hat schon bessere Tage gesehen. Die ATHE ist eine Art Dachverband, in dem etwa 2.000 US-amerikanische Theaterwissenschaftler, Hochschullehrer und darstellende Künstler organisiert sind. Das Zentrum besteht aus einem weit verzweigten System von Tagungs- und Veranstaltungsräumen, Chill-out-Zonen mit Kritikerecke, Bars und besagtem Theaterkomplex, in dem seit seiner Gründung im Jahr 1995 ein paar bemerkenswerte Aufführungen stattgefunden haben. So gesehen ist nichts Ungewöhnliches am ATHEMOO, wie das Gelände offiziell heißt. Doch sämtliche Räume, inklusive Theatersaal, Proben- und Studiobühnen sind virtuell. Das heißt, sie sind nur über das Internet zu erreichen. Man darf sich hier aber jetzt keine enorme digitale Illusionsmaschinerie vorstellen. ATHEMOO ist kaum mehr als eine improvisierte Karte, auf der lediglich Lage und Name der einzelnen Räume aufgezeichnet sind. Trotzdem finden hier Versammlungen, Seminare und Theaterprojekte statt. Wer will, kann einfach zum Chatten vorbeikommen, in der Hoffnung, hier zwecks Fachgespräch auf Leute mit ähnlichen Interessen zu stoßen: Leute also, die sich für Theater im Internet interessieren. Theater ohne Körper und Raum Neulinge auf diesem Gebiet werden möglicherweise erst einmal Aufklärung darüber erwarten, wie bitte schön Theater ohne reale Räume, geschweige denn reale Körper überhaupt funktionieren soll. Die Spezialisten-Gemeinde von ATHEMOO wird dann vielleicht ein wenig mitleidig lächeln, und solche Fragen für ziemlich irrelevant halten. Sorge bereitet ihr allerhöchstens das Fehlen realer Zuschauer. Denn mag Theater inzwischen auch ohne Körper und Räume auskommen, Zuschauer sind unentbehrlich wie eh und je.'; $url = 'http://testbereich3.nachtkritik.de/administrator/index.php?option=com_content&view=article&layout=edit&id=23'; $author = new Author('Slevogt', 'Esther', 8801197); $note = new Note($pixel->privId, $short, $full, FALSE, TRUE, $url); $test = new NoteHandling(); $test->createNote($note, $author); // Format für Pixel export // <IMG src="domain.met.vgwort.de/na/c5b7568d28884052a9ff92d5afd08f34" // height="1" width="1" border=“0“> ?>
Output for 5.4.34 - 5.6.28, 7.0.0 - 7.1.0
Fatal error: Class 'SoapClient' not found in /in/hMrMS on line 50
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP_ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl'
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.4.32
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.2.7 - 5.2.17
Notice: SoapClient::SoapClient(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS on line 137 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.2.0 - 5.2.6
Notice: SoapClient::SoapClient(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS on line 137 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.1.3 - 5.1.6
Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS on line 137 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->__construct('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.1.0 - 5.1.2
Notice: Use of undefined constant SOAP_SINGLE_ELEMENT_ARRAYS - assumed 'SOAP_SINGLE_ELEMENT_ARRAYS' in /in/hMrMS on line 135 Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS on line 137 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->__construct('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Use of undefined constant SOAP_SINGLE_ELEMENT_ARRAYS - assumed 'SOAP_SINGLE_ELEMENT_ARRAYS' in /in/hMrMS on line 135 Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/hMrMS on line 137 Warning: I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/hMrMS on line 137 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->__construct('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.0.3
Notice: Use of undefined constant SOAP_SINGLE_ELEMENT_ARRAYS - assumed 'SOAP_SINGLE_ELEMENT_ARRAYS' in /in/hMrMS on line 135 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(137): SoapClient->__construct('https://Slevogt...', Array) #1 /in/hMrMS(180): PixelHandling->__construct() #2 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Notice: Use of undefined constant SOAP_SINGLE_ELEMENT_ARRAYS - assumed 'SOAP_SINGLE_ELEMENT_ARRAYS' in /in/hMrMS on line 135 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/hMrMS:137 Stack trace: #0 /in/hMrMS(180): PixelHandling->__construct('https://Slevogt...', Array) #1 {main} thrown in /in/hMrMS on line 137
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/hMrMS on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/hMrMS on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/hMrMS on line 5
Process exited with code 255.