3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); $userid = 149; // $url = "http://apitest/user/show"; // $url = "http://apitest/pushserver/messagecreate.json?"; $url = "http://apitest/pushserver/lookupuserid"; $category = 'singer'; // $category = $_POST['category']; $data = array('userid' => $userid ); $headers = array('X_USERNAME' => 's', 'X_PASSWORD'=> '$!' ); $data = array('message' => 'test message', 'user_id'=>' ["1","2","3"]' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); //Find the users of the selected category $users = get_users(array( 'meta_key' => '_talent_category', 'meta_value' => $category, )); echo '<pre>'; // print_r($users); echo '</pre>'; foreach( $users as $user ) { $id = $user->ID; } //Find out which users are registered with the push service //Send push notification to selected user //$var = curl_getinfo($ch); //var_dump ($var); curl_exec($ch); curl_close($ch);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 43, Position 2 = 47
Branch analysis from position: 43
2 jumps found. (Code = 78) Position 1 = 44, Position 2 = 47
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/AfZuE
function name:  (null)
number of ops:  55
compiled vars:  !0 = $ch, !1 = $userid, !2 = $url, !3 = $category, !4 = $data, !5 = $headers, !6 = $users, !7 = $user, !8 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $9      
          2        ASSIGN                                                   !0, $9
    3     3        ASSIGN                                                   !1, 149
    6     4        ASSIGN                                                   !2, 'http%3A%2F%2Fapitest%2Fpushserver%2Flookupuserid'
    7     5        ASSIGN                                                   !3, 'singer'
    9     6        INIT_ARRAY                                       ~14     !1, 'userid'
          7        ASSIGN                                                   !4, ~14
   10     8        ASSIGN                                                   !5, <array>
   11     9        ASSIGN                                                   !4, <array>
   12    10        INIT_FCALL_BY_NAME                                       'curl_setopt'
         11        SEND_VAR_EX                                              !0
         12        FETCH_CONSTANT                                   ~18     'CURLOPT_HTTPHEADER'
         13        SEND_VAL_EX                                              ~18
         14        SEND_VAR_EX                                              !5
         15        DO_FCALL                                      0          
   13    16        INIT_FCALL_BY_NAME                                       'curl_setopt'
         17        SEND_VAR_EX                                              !0
         18        FETCH_CONSTANT                                   ~20     'CURLOPT_HEADER'
         19        SEND_VAL_EX                                              ~20
         20        SEND_VAL_EX                                              1
         21        DO_FCALL                                      0          
   14    22        INIT_FCALL_BY_NAME                                       'curl_setopt'
         23        SEND_VAR_EX                                              !0
         24        FETCH_CONSTANT                                   ~22     'CURLOPT_URL'
         25        SEND_VAL_EX                                              ~22
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0          
   15    28        INIT_FCALL_BY_NAME                                       'curl_setopt'
         29        SEND_VAR_EX                                              !0
         30        FETCH_CONSTANT                                   ~24     'CURLOPT_POSTFIELDS'
         31        SEND_VAL_EX                                              ~24
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0          
   18    34        INIT_FCALL_BY_NAME                                       'get_users'
   19    35        INIT_ARRAY                                       ~26     '_talent_category', 'meta_key'
   20    36        ADD_ARRAY_ELEMENT                                ~26     !3, 'meta_value'
         37        SEND_VAL_EX                                              ~26
         38        DO_FCALL                                      0  $27     
   18    39        ASSIGN                                                   !6, $27
   22    40        ECHO                                                     '%3Cpre%3E'
   24    41        ECHO                                                     '%3C%2Fpre%3E'
   26    42      > FE_RESET_R                                       $29     !6, ->47
         43    > > FE_FETCH_R                                               $29, !7, ->47
   28    44    >   FETCH_OBJ_R                                      ~30     !7, 'ID'
         45        ASSIGN                                                   !8, ~30
   26    46      > JMP                                                      ->43
         47    >   FE_FREE                                                  $29
   42    48        INIT_FCALL_BY_NAME                                       'curl_exec'
         49        SEND_VAR_EX                                              !0
         50        DO_FCALL                                      0          
   43    51        INIT_FCALL_BY_NAME                                       'curl_close'
         52        SEND_VAR_EX                                              !0
         53        DO_FCALL                                      0          
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1390 KiB | 13 Q