3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassA { public function method_a (ClassB $b) {} } class ClassWrong{} $a = new ClassA; $a->method_a(new ClassWrong); echo 'done.'; /* throw new MyException('This is a really bad error', 123); final public ExceptionException::getPrevious ( void ) error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, '00007600', $errno, $errfile, $errline, new Exception('jjj')); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { var_dump($e->getPrevious()); }*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jP2QC
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'ClassA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'method_a'
          4        NEW                                              $4      'ClassWrong'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   12     8        ECHO                                                     'done.'
   50     9      > RETURN                                                   1

Class ClassA:
Function method_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jP2QC
function name:  method_a
number of ops:  2
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function method_a

End of class ClassA.

Class ClassWrong: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.61 ms | 1393 KiB | 13 Q