3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domain = 'www.foo.com'; if (substr($domain, 0, 7) == "http://") { $domain = substr_replace($domain, "", 0, 7); } $url = "http://" . $domain; $params = explode('.', $url); var_dump($params);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/voPne
function name:  (null)
number of ops:  26
compiled vars:  !0 = $domain, !1 = $url, !2 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'www.foo.com'
    5     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 7
          5        DO_ICALL                                         $4      
          6        IS_EQUAL                                                 $4, 'http%3A%2F%2F'
          7      > JMPZ                                                     ~5, ->15
    6     8    >   INIT_FCALL                                               'substr_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 ''
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 7
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !0, $6
    8    15    >   CONCAT                                           ~8      'http%3A%2F%2F', !0
         16        ASSIGN                                                   !1, ~8
   11    17        INIT_FCALL                                               'explode'
         18        SEND_VAL                                                 '.'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !2, $10
   13    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.55 ms | 1395 KiB | 21 Q