<?php$request = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://PHPSOAPSegfaultTestcase"><SOAP-ENV:Body><ns1:whatever><name>zeproduct</name></ns1:whatever></SOAP-ENV:Body></SOAP-ENV:Envelope>';ini_set('soap.wsdl_cache_enabled', 0);$classmap = include('types.inc.php');function whatever($name){ $foo = new MyFoo(); $foo->name = $name; $bar = new MyBar(); $bar->id = time(); $bar->description = "Candy Bar"; // without this line, it works even with classmaps enabled $foo->bar = $bar; return $foo;}// with the classmap, a crash will occur// $s = new SoapServer('test.wsdl', array('classmap' => $classmap));// without it, all is fine$s = new SoapServer('test.wsdl');$s->addFunction('whatever');// to call server.php directly, use this line// $s->handle($request);// to call via client.php, use this line$s->handle(file_get_contents('php://input'));?>