3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hello '.(new class('world') { public function __construct($hello) { $this->hello = $hello; } })->hello; $test = new class extends \Exception {}; var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TJeZ2
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <undef> 
          1        NEW                                              $2      $1
          2        SEND_VAL_EX                                              'world'
          3        DO_FCALL                                      0          
    7     4        FETCH_OBJ_R                                      ~4      $2, 'hello'
          5        CONCAT                                           ~5      'Hello+', ~4
          6        ECHO                                                     ~5
   11     7        DECLARE_ANON_CLASS                               <ptr>   'exception'
          8        NEW                                              $7      $6
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $7
   13    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function __construct

End of class class@anonymous.

Class Exception@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.91 ms | 1395 KiB | 15 Q