3v4l.org

run code in 300+ 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; var_dump($this); }; $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/WnjAb
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $0      'ChuckNorrisException'
          1        SEND_VAL_EX                                              'Hello'
   21     2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
   22     5*     > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWnjAb%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnjAb
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $newTrace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      <array>
   13     1        FETCH_THIS                                       $1      
          2        ASSIGN_OBJ                                               $1, 'trace'
          3        OP_DATA                                                  !0
   14     4        INIT_FCALL                                               'var_dump'
          5        FETCH_THIS                                       ~3      
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   15     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWnjAb%3A11%240

Class ChuckNorrisException:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WnjAb
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                                  '%00%7Bclosure%7D%2Fin%2FWnjAb%3A11%240'
         12        ASSIGN                                                   !4, ~7
   16    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          
   17    21      > RETURN                                                   null

End of function __construct

End of class ChuckNorrisException.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.24 ms | 1400 KiB | 15 Q