3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = new \stdClass(); $foosoap = new \SoapVar($foo, SOAP_ENC_OBJECT, 'Foo', 'typns', 'tag', 'tagns'); var_dump($foosoap); echo $foosoap->enc_stype; echo get_class($foosoap->enc_value);
based on J9BLS
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SoapVar' not found in /in/QVmJR:5 Stack trace: #0 {main} thrown in /in/QVmJR on line 5
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Class 'SoapVar' not found in /in/QVmJR on line 5
Process exited with code 255.
Output for 5.3.21 - 5.3.29
object(SoapVar)#2 (6) { ["enc_type"]=> int(301) ["enc_value"]=> object(stdClass)#1 (0) { } ["enc_stype"]=> string(3) "Foo" ["enc_ns"]=> string(5) "typns" ["enc_name"]=> string(3) "tag" ["enc_namens"]=> string(5) "tagns" } FoostdClass