3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $test = 5; public function getTest(){ return $this->test; } } class B { public function test(A $a) { die(($a instanceof A) ? var_export($a)."\n"."output: {$a->getTest()}" : "Fuck php, i am ".gettype($a)); } } class Test { public function test() { $b = new B(); $b->test(null); } } $server = new \SoapServer(null, array("uri" => "http://localhost", "location" => "http://localhost")); $server->setClass("Test"); try{ $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>'); } catch (\Exception $e) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 19
Branch analysis from position: 19
Jump found. Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
Jump found. Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
Jump found. Position 1 = -2
filename:       /in/QruYH
function name:  (null)
number of ops:  20
compiled vars:  !0 = $server, !1 = $e
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
  12     1        NOP                                                      
  19     2        NOP                                                      
  28     3        NEW                                              $5      :-6
         4        SEND_VAL_EX                                              null
         5        SEND_VAL_EX                                              <array>
         6        DO_FCALL                                      0          
         7        ASSIGN                                                   !0, $5
  29     8        INIT_METHOD_CALL                                         !0, 'setClass'
         9        SEND_VAL_EX                                              'Test'
        10        DO_FCALL                                      0          
  32    11        INIT_METHOD_CALL                                         !0, 'handle'
  33    12        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A++++%3CSOAP-ENV%3AEnvelope+xmlns%3ASOAP-ENV%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22+xmlns%3Ans1%3D%22http%3A%2F%2Flocalhost%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3ASOAP-ENC%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F%22+SOAP-ENV%3AencodingStyle%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F%22%3E%3CSOAP-ENV%3ABody%3E%3Cns1%3Atest%3E%3C%2Fns1%3Atest%3E%3C%2FSOAP-ENV%3ABody%3E%3C%2FSOAP-ENV%3AEnvelope%3E'
        13        DO_FCALL                                      0          
        14      > JMP                                                      ->19
  34    15  E > > CATCH                                                    'Exception', !1
  35    16    >   INIT_FCALL                                               'var_dump'
        17        SEND_VAR                                                 !1
        18        DO_ICALL                                                 
        19    > > RETURN                                                   1

Class A:
Function gettest:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/QruYH
function name:  getTest
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   FETCH_OBJ_R                                      $0      'test'
         1      > RETURN                                                   $0
   8     2*     > RETURN                                                   null

End of function gettest

End of class A.

Class B:
Function test:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
Jump found. Position 1 = 19
Branch analysis from position: 19
Jump found. Position 1 = -2
Branch analysis from position: 14
Jump found. Position 1 = -2
filename:       /in/QruYH
function name:  test
number of ops:  21
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   RECV                                             !0      
  15     1        INSTANCEOF                                       ~1      !0, 'A'
         2      > JMPZ                                                     ~1, ->14
         3    >   INIT_FCALL                                               'var_export'
         4        SEND_VAR                                                 !0
         5        DO_ICALL                                         $2      
         6        CONCAT                                           ~3      $2, '%0A'
         7        INIT_METHOD_CALL                                         !0, 'getTest'
         8        DO_FCALL                                      0  $4      
         9        NOP                                                      
        10        FAST_CONCAT                                      ~5      'output%3A+', $4
        11        CONCAT                                           ~6      ~3, ~5
        12        QM_ASSIGN                                        ~7      ~6
        13      > JMP                                                      ->19
        14    >   INIT_FCALL                                               'gettype'
        15        SEND_VAR                                                 !0
        16        DO_ICALL                                         $8      
        17        CONCAT                                           ~9      'Fuck+php%2C+i+am+', $8
        18        QM_ASSIGN                                        ~7      ~9
        19    > > EXIT                                                     ~7
  16    20*     > RETURN                                                   null

End of function test

End of class B.

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/QruYH
function name:  test
number of ops:  7
compiled vars:  !0 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  23     0  E >   NEW                                              $1      :-6
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $1
  24     3        INIT_METHOD_CALL                                         !0, 'test'
         4        SEND_VAL_EX                                              null
         5        DO_FCALL                                      0          
  25     6      > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 7.2.0