3v4l.org

run code in 500+ PHP versions simultaneously
<?php /** * @author Lisachenko Alexander <https://twitter.com/lisachenko> */ class ChuckNorrisException extends Exception { public function __construct($message, array $trace = array(), $code = 0, Exception $previous = null) { parent::__construct($message, 0, $previous); $this->file = 'Real Life'; $setter = function(array $newTrace = array()) { /** @var $this Exception */ $this->trace = $newTrace; }; $setter->bindTo($this, 'Exception')->__invoke($trace); } } throw new ChuckNorrisException("Hello", array( array('file' => 'Chuck Norris, level', 'line' => 99, 'class' => 'own you ', 'function' => 'with uppercut!') ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/FTBog
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   NEW                                                  $0      'ChuckNorrisException'
          1        SEND_VAL_EX                                                  'Hello'
   20     2        SEND_VAL_EX                                                  <array>
   19     3        DO_FCALL                                          0          
   20     4      > THROW                                             0          $0
   21     5*     > RETURN                                                       1

Class ChuckNorrisException:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FTBog
function name:  __construct
number of ops:  22
compiled vars:  !0 = $message, !1 = $trace, !2 = $code, !3 = $previous, !4 = $setter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      <array>
          2        RECV_INIT                                            !2      0
          3        RECV_INIT                                            !3      null
    9     4        INIT_STATIC_METHOD_CALL                                      
          5        SEND_VAR_EX                                                  !0
          6        SEND_VAL_EX                                                  0
          7        SEND_VAR_EX                                                  !3
          8        DO_FCALL                                          0          
   10     9        ASSIGN_OBJ                                                   'file'
         10        OP_DATA                                                      'Real+Life'
   11    11        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
         12        ASSIGN                                                       !4, ~7
   15    13        INIT_METHOD_CALL                                             !4, 'bindTo'
         14        FETCH_THIS                                           $9      
         15        SEND_VAR_EX                                                  $9
         16        SEND_VAL_EX                                                  'Exception'
         17        DO_FCALL                                          0  $10     
         18        INIT_METHOD_CALL                                             $10, '__invoke'
         19        SEND_VAR_EX                                                  !1
         20        DO_FCALL                                          0          
   16    21      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FTBog
function name:  {closure:ChuckNorrisException::__construct():11}
number of ops:  4
compiled vars:  !0 = $newTrace
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                            !0      <array>
   13     1        ASSIGN_OBJ                                                   'trace'
          2        OP_DATA                                                      !0
   14     3      > RETURN                                                       null

End of Dynamic Function 0

End of function __construct

End of class ChuckNorrisException.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.3 ms | 3159 KiB | 13 Q