<?php
class A {
}
class B {
public function test(A $a)
{
if (!$a instanceof A) {
die("Fuck type hinting, i am ". (is_object($a) ? get_class($a) : gettype($a)). "! This is SOAP");
}
}
}
class C {
}
class Test
{
public function test()
{
$b = new B();
$b->test(new C());
}
}
$server = new \SoapServer(null, array("uri" => "http://localhost", "location" => "http://localhost"));
$server->setClass("Test");
$server->handle('<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>');
Fatal error: Uncaught Error: Class "SoapServer" not found in /in/15H32:30
Stack trace:
#0 {main}
thrown in /in/15H32 on line 30
Process exited with code 255.
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Test has a deprecated constructor in /in/15H32 on line 21
Fatal error: Uncaught Error: Class 'SoapServer' not found in /in/15H32:30
Stack trace:
#0 {main}
thrown in /in/15H32 on line 30
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.26
Fatal error: Uncaught Error: Class 'SoapServer' not found in /in/15H32:30
Stack trace:
#0 {main}
thrown in /in/15H32 on line 30
Process exited with code 255.
Fatal error: Class 'SoapServer' not found in /in/15H32 on line 30
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Fuck type hinting, i am C! This is SOAP Process exited with code 255.
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/15H32 on line 30
Fuck type hinting, i am C! This is SOAP Process exited with code 255.
Output for 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/15H32 on line 30
<?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>SOAP-ENV:Server</faultcode><faultstring>Argument 1 passed to B::test() must be an instance of A, called in /in/15H32 on line 26 and defined</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/15H32 on line 30
<?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>SOAP-ENV:Server</faultcode><faultstring>Argument 1 must be an instance of A</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/15H32 on line 30
<?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>SOAP-ENV:Server</faultcode><faultstring>Argument 1 must be an instance of A</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
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/15H32 on line 9
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/15H32 on line 9
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/15H32 on line 9
Process exited with code 255.