3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hello '.(new class('world') { public function __construct($hello) { $this->hello = $hello; } })->hello;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0caXm
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $1      $0
          2        SEND_VAL_EX                                              'world'
          3        DO_FCALL                                      0          
    7     4        FETCH_OBJ_R                                      ~3      $1, 'hello'
          5        CONCAT                                           ~4      'Hello+', ~3
          6        ECHO                                                     ~4
          7      > 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/0caXm
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.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.24 ms | 938 KiB | 14 Q