3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SoapClientEx extends SoapClient { /** * @var null|SoapServer */ protected $server = null; public function __construct($server, array $options) { parent::__construct(null, $options); $this->server = $server; } public function __doRequest($request, $location, $action, $version, $one_way = 0) { ob_start(); $this->server->handle($request); //header_remove(); return ob_get_clean(); } } class Test { function mult($a, $b) { return $a * $b; } } $server = new SoapServer(null, array( 'uri' => 'localhost' )); $server->setClass('Test'); $client = new SoapClientEx($server, array( 'uri' => 'localhost', 'location' => 'localhost' )); $result = $client->mult(2,3); echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "SoapClient" not found in /in/WrcZo:4 Stack trace: #0 {main} thrown in /in/WrcZo on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.1 ms | 401 KiB | 8 Q