3v4l.org

run code in 300+ PHP versions simultaneously
<?php function listener(&$event) { $event->mutation = 1; $event = new \DateTimeImmutable(); } $event1 = new stdClass(); $event2 = new stdClass(); listener($event1); $satellite = $event2; listener($satellite); print_r($event1) . "\n"; print_r($event2) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4O6Qg
function name:  (null)
number of ops:  24
compiled vars:  !0 = $event1, !1 = $event2, !2 = $satellite
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   11     6        INIT_FCALL                                               'listener'
          7        SEND_REF                                                 !0
          8        DO_FCALL                                      0          
   13     9        ASSIGN                                                   !2, !1
   14    10        INIT_FCALL                                               'listener'
         11        SEND_REF                                                 !2
         12        DO_FCALL                                      0          
   16    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $12     
         16        CONCAT                                           ~13     $12, '%0A'
         17        FREE                                                     ~13
   17    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $14     
         21        CONCAT                                           ~15     $14, '%0A'
         22        FREE                                                     ~15
         23      > RETURN                                                   1

Function listener:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4O6Qg
function name:  listener
number of ops:  7
compiled vars:  !0 = $event
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN_OBJ                                               !0, 'mutation'
          2        OP_DATA                                                  1
    5     3        NEW                                              $2      'DateTimeImmutable'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
    6     6      > RETURN                                                   null

End of function listener

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.13 ms | 1001 KiB | 16 Q