3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', true); error_reporting(-1); function o($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization:key=123')); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, array(1,2,3)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; } var_dump( o("http://android.googleapis.com/gcm/send") ); var_dump( o("https://android.googleapis.com/gcm/send") );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rnBLn
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 -1
          6        DO_ICALL                                                 
   18     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'o'
          9        SEND_VAL                                                 'http%3A%2F%2Fandroid.googleapis.com%2Fgcm%2Fsend'
         10        DO_FCALL                                      0  $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
   19    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'o'
         15        SEND_VAL                                                 'https%3A%2F%2Fandroid.googleapis.com%2Fgcm%2Fsend'
         16        DO_FCALL                                      0  $4      
         17        SEND_VAR                                                 $4
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function o:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rnBLn
function name:  o
number of ops:  49
compiled vars:  !0 = $url, !1 = $ch, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !1, $3
    7     4        INIT_FCALL_BY_NAME                                       'curl_setopt'
          5        SEND_VAR_EX                                              !1
          6        FETCH_CONSTANT                                   ~5      'CURLOPT_URL'
          7        SEND_VAL_EX                                              ~5
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    8    10        INIT_FCALL_BY_NAME                                       'curl_setopt'
         11        SEND_VAR_EX                                              !1
         12        FETCH_CONSTANT                                   ~7      'CURLOPT_HTTPHEADER'
         13        SEND_VAL_EX                                              ~7
         14        SEND_VAL_EX                                              <array>
         15        DO_FCALL                                      0          
    9    16        INIT_FCALL_BY_NAME                                       'curl_setopt'
         17        SEND_VAR_EX                                              !1
         18        FETCH_CONSTANT                                   ~9      'CURLOPT_SSL_VERIFYPEER'
         19        SEND_VAL_EX                                              ~9
         20        SEND_VAL_EX                                              <false>
         21        DO_FCALL                                      0          
   10    22        INIT_FCALL_BY_NAME                                       'curl_setopt'
         23        SEND_VAR_EX                                              !1
         24        FETCH_CONSTANT                                   ~11     'CURLOPT_POST'
         25        SEND_VAL_EX                                              ~11
         26        SEND_VAL_EX                                              <true>
         27        DO_FCALL                                      0          
   11    28        INIT_FCALL_BY_NAME                                       'curl_setopt'
         29        SEND_VAR_EX                                              !1
         30        FETCH_CONSTANT                                   ~13     'CURLOPT_POSTFIELDS'
         31        SEND_VAL_EX                                              ~13
         32        SEND_VAL_EX                                              <array>
         33        DO_FCALL                                      0          
   12    34        INIT_FCALL_BY_NAME                                       'curl_setopt'
         35        SEND_VAR_EX                                              !1
         36        FETCH_CONSTANT                                   ~15     'CURLOPT_RETURNTRANSFER'
         37        SEND_VAL_EX                                              ~15
         38        SEND_VAL_EX                                              <true>
         39        DO_FCALL                                      0          
   13    40        INIT_FCALL_BY_NAME                                       'curl_exec'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0  $17     
         43        ASSIGN                                                   !2, $17
   14    44        INIT_FCALL_BY_NAME                                       'curl_close'
         45        SEND_VAR_EX                                              !1
         46        DO_FCALL                                      0          
   15    47      > RETURN                                                   !2
   16    48*     > RETURN                                                   null

End of function o

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.69 ms | 1403 KiB | 21 Q