3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Hello { public function __construct(string $hello, int $k) { $this->hello = $hello; $this->k = $k; } } try { new Hello(123, 'ss'); } catch (Throwable $e) { echo get_class($e); echo $e; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uNDiS
function name:  (null)
number of ops:  11
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Hello'
          1        SEND_VAL_EX                                              123
          2        SEND_VAL_EX                                              'ss'
          3        DO_FCALL                                      0          
          4        FREE                                                     $1
          5      > JMP                                                      ->10
   13     6  E > > CATCH                                       last         'Throwable'
   14     7    >   GET_CLASS                                        ~3      !0
          8        ECHO                                                     ~3
   15     9        ECHO                                                     !0
   16    10    > > RETURN                                                   1

Class Hello:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uNDiS
function name:  __construct
number of ops:  7
compiled vars:  !0 = $hello, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ASSIGN_OBJ                                               'hello'
          3        OP_DATA                                                  !0
    8     4        ASSIGN_OBJ                                               'k'
          5        OP_DATA                                                  !1
    9     6      > RETURN                                                   null

End of function __construct

End of class Hello.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.14 ms | 1385 KiB | 13 Q