3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = array( array( 'id' => 1, 'first_name' => 'Peter', 'last_name' => 'Griffin', ), array( 'id' => 14, 'first_name' => 'Ben', 'last_name' => 'Smith', ), array( 'id' => 3, 'first_name' => 'Joe', 'last_name' => 'Doe', ) ); $ids = array_column($users, 'id'); //add_action('um_before_profile_fields', 'trigger_new_notification', 100); // Not sure what this does function trigger_new_notification( $args , $ids ) { global $um_notifications; /*$vars = array( "post_title" => get_post_field( 'post_title', $project_id ), "photo" => um_get_avatar_url( get_avatar( get_current_user_id(), 40 ) ), "member" => um_user('display_name'), "notification_uri" => cpm_url_project_details( $project_id ) );*/ foreach($ids as $row){ //$um_notifications->api->store_notification( $row, 'new_action', $vars ); echo $row . " "; } } //do_action( 'um_before_profile_fields'); // what does this do? // Dont know what $args is suppsed to be, just made a dummy. $args = ["something", "else"]; // Here I call the function and pass $args and $ids. trigger_new_notification( $args , $ids );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jE5QC
function name:  (null)
number of ops:  12
compiled vars:  !0 = $users, !1 = $ids, !2 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'id'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   40     6        ASSIGN                                                   !2, <array>
   42     7        INIT_FCALL                                               'trigger_new_notification'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function trigger_new_notification:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/jE5QC
function name:  trigger_new_notification
number of ops:  10
compiled vars:  !0 = $args, !1 = $ids, !2 = $um_notifications, !3 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        BIND_GLOBAL                                              !2, 'um_notifications'
   31     3      > FE_RESET_R                                       $4      !1, ->8
          4    > > FE_FETCH_R                                               $4, !3, ->8
   33     5    >   CONCAT                                           ~5      !3, '+'
          6        ECHO                                                     ~5
   31     7      > JMP                                                      ->4
          8    >   FE_FREE                                                  $4
   35     9      > RETURN                                                   null

End of function trigger_new_notification

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.31 ms | 1398 KiB | 16 Q