3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getHtml($url, $post = null) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); if(!empty($post)) { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } $result = curl_exec($ch); curl_close($ch); return $result; } $dom = getHtml("https://status.playstation.com/en-us/"); print_r($dom);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HeVFO
function name:  (null)
number of ops:  8
compiled vars:  !0 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'gethtml'
          1        SEND_VAL                                                 'https%3A%2F%2Fstatus.playstation.com%2Fen-us%2F'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   18     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function gethtml

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.1 ms | 1403 KiB | 16 Q