3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getwhois($domain, $tld) { require_once("whois.class.php"); $whois = new Whois(); if( !$whois->ValidDomain($domain.'.'.$tld) ){ return 'Sorry, the domain is not valid or not supported.'; } if( $whois->Lookup($domain.'.'.$tld) ) { return $whois->GetData(1); }else{ return 'Sorry, an error occurred.'; } } $domain = trim($_REQUEST['domain']); $dot = strpos($domain, '.'); $sld = substr($domain, 0, $dot); $tld = substr($domain, $dot+1); $whois = getwhois($sld, $tld); echo " "; echo $whois; echo " "; getwhois("summoner","io"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O9u4M
function name:  (null)
number of ops:  36
compiled vars:  !0 = $domain, !1 = $dot, !2 = $sld, !3 = $tld, !4 = $whois
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'trim'
          1        FETCH_R                      global              ~5      '_REQUEST'
          2        FETCH_DIM_R                                      ~6      ~5, 'domain'
          3        SEND_VAL                                                 ~6
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !0, $7
   22     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '.'
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !1, $9
   23    11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !2, $11
   24    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !0
         19        ADD                                              ~13     !1, 1
         20        SEND_VAL                                                 ~13
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !3, $14
   26    23        INIT_FCALL                                               'getwhois'
         24        SEND_VAR                                                 !2
         25        SEND_VAR                                                 !3
         26        DO_FCALL                                      0  $16     
         27        ASSIGN                                                   !4, $16
   28    28        ECHO                                                     '%0A%0A'
   31    29        ECHO                                                     !4
   32    30        ECHO                                                     '%0A'
   34    31        INIT_FCALL                                               'getwhois'
         32        SEND_VAL                                                 'summoner'
         33        SEND_VAL                                                 'io'
         34        DO_FCALL                                      0          
   35    35      > RETURN                                                   1

Function getwhois:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O9u4M
function name:  getwhois
number of ops:  27
compiled vars:  !0 = $domain, !1 = $tld, !2 = $whois
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INCLUDE_OR_EVAL                                          'whois.class.php', REQUIRE_ONCE
    6     3        NEW                                              $4      'Whois'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $4
    8     6        INIT_METHOD_CALL                                         !2, 'ValidDomain'
          7        CONCAT                                           ~7      !0, '.'
          8        CONCAT                                           ~8      ~7, !1
          9        SEND_VAL_EX                                              ~8
         10        DO_FCALL                                      0  $9      
         11        BOOL_NOT                                         ~10     $9
         12      > JMPZ                                                     ~10, ->14
    9    13    > > RETURN                                                   'Sorry%2C+the+domain+is+not+valid+or+not+supported.'
   12    14    >   INIT_METHOD_CALL                                         !2, 'Lookup'
         15        CONCAT                                           ~11     !0, '.'
         16        CONCAT                                           ~12     ~11, !1
         17        SEND_VAL_EX                                              ~12
         18        DO_FCALL                                      0  $13     
         19      > JMPZ                                                     $13, ->25
   14    20    >   INIT_METHOD_CALL                                         !2, 'GetData'
         21        SEND_VAL_EX                                              1
         22        DO_FCALL                                      0  $14     
         23      > RETURN                                                   $14
         24*       JMP                                                      ->26
   16    25    > > RETURN                                                   'Sorry%2C+an+error+occurred.'
   18    26*     > RETURN                                                   null

End of function getwhois

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.35 ms | 1403 KiB | 21 Q