3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('users'=>array( array( 'username'=>'testusername1', 'password'=>'testpassword1', 'firstname'=>'test', 'lastname'=>'user', 'email'=>'testusername@fakemail.com' ) )); $ch = curl_init("http://vps02.ouhk.edu.hk/~qess/webservice/rest/server.php?wstoken=f4dfb904d79777f22cafe3c7472b744c&wsfunction=core_user_create_users&moodlewsrestformat=json"); curl_setopt_array($ch,array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, // don't return headers CURLOPT_ENCODING => "", // handle all encodings CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36", // who am i CURLOPT_AUTOREFERER => true, // set referer on redirect CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect CURLOPT_TIMEOUT => 120, // timeout on response CURLOPT_MAXREDIRS => 10, // stop after 10 redirects CURLOPT_POST => true, // i am sending post data CURLOPT_POSTFIELDS => http_build_query($data), // this are my post vars CURLOPT_SSL_VERIFYHOST => 0, // don't verify ssl CURLOPT_SSL_VERIFYPEER => false, // CURLOPT_VERBOSE => 1 // )); var_dump(curl_exec($ch));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XO6aN
function name:  (null)
number of ops:  45
compiled vars:  !0 = $data, !1 = $ch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAL_EX                                              'http%3A%2F%2Fvps02.ouhk.edu.hk%2F%7Eqess%2Fwebservice%2Frest%2Fserver.php%3Fwstoken%3Df4dfb904d79777f22cafe3c7472b744c%26wsfunction%3Dcore_user_create_users%26moodlewsrestformat%3Djson'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   13     5        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
          6        SEND_VAR_EX                                              !1
   14     7        FETCH_CONSTANT                                   ~5      'CURLOPT_RETURNTRANSFER'
          8        INIT_ARRAY                                       ~6      <true>, ~5
   15     9        FETCH_CONSTANT                                   ~7      'CURLOPT_HEADER'
   14    10        ADD_ARRAY_ELEMENT                                ~6      <false>, ~7
   16    11        FETCH_CONSTANT                                   ~8      'CURLOPT_ENCODING'
         12        ADD_ARRAY_ELEMENT                                ~6      '', ~8
   17    13        FETCH_CONSTANT                                   ~9      'CURLOPT_USERAGENT'
         14        ADD_ARRAY_ELEMENT                                ~6      'Mozilla%2F5.0+%28Windows+NT+6.1%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F41.0.2228.0+Safari%2F537.36', ~9
   18    15        FETCH_CONSTANT                                   ~10     'CURLOPT_AUTOREFERER'
   14    16        ADD_ARRAY_ELEMENT                                ~6      <true>, ~10
   19    17        FETCH_CONSTANT                                   ~11     'CURLOPT_CONNECTTIMEOUT'
         18        ADD_ARRAY_ELEMENT                                ~6      120, ~11
   20    19        FETCH_CONSTANT                                   ~12     'CURLOPT_TIMEOUT'
         20        ADD_ARRAY_ELEMENT                                ~6      120, ~12
   21    21        FETCH_CONSTANT                                   ~13     'CURLOPT_MAXREDIRS'
         22        ADD_ARRAY_ELEMENT                                ~6      10, ~13
   22    23        FETCH_CONSTANT                                   ~14     'CURLOPT_POST'
   14    24        ADD_ARRAY_ELEMENT                                ~6      <true>, ~14
   23    25        FETCH_CONSTANT                                   ~15     'CURLOPT_POSTFIELDS'
         26        INIT_FCALL                                               'http_build_query'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $16     
         29        ADD_ARRAY_ELEMENT                                ~6      $16, ~15
   24    30        FETCH_CONSTANT                                   ~17     'CURLOPT_SSL_VERIFYHOST'
         31        ADD_ARRAY_ELEMENT                                ~6      0, ~17
   25    32        FETCH_CONSTANT                                   ~18     'CURLOPT_SSL_VERIFYPEER'
   14    33        ADD_ARRAY_ELEMENT                                ~6      <false>, ~18
   26    34        FETCH_CONSTANT                                   ~19     'CURLOPT_VERBOSE'
         35        ADD_ARRAY_ELEMENT                                ~6      1, ~19
         36        SEND_VAL_EX                                              ~6
         37        DO_FCALL                                      0          
   28    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL_BY_NAME                                       'curl_exec'
         40        SEND_VAR_EX                                              !1
         41        DO_FCALL                                      0  $21     
         42        SEND_VAR                                                 $21
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.89 ms | 1400 KiB | 17 Q