3v4l.org

run code in 300+ PHP versions simultaneously
<?php $site = "http://hollandshielding.com/"; $url = parse_url($site); if(stripos($url['host'], 'www.') === false) { $url['host'] = 'www.'.$url['host']; } echo $url['host'];
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Q217l
function name:  (null)
number of ops:  19
compiled vars:  !0 = $site, !1 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fhollandshielding.com%2F'
    3     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    5     5        INIT_FCALL                                               'stripos'
          6        FETCH_DIM_R                                      ~5      !1, 'host'
          7        SEND_VAL                                                 ~5
          8        SEND_VAL                                                 'www.'
          9        DO_ICALL                                         $6      
         10        TYPE_CHECK                                    4          $6
         11      > JMPZ                                                     ~7, ->16
    7    12    >   FETCH_DIM_R                                      ~9      !1, 'host'
         13        CONCAT                                           ~10     'www.', ~9
         14        ASSIGN_DIM                                               !1, 'host'
         15        OP_DATA                                                  ~10
   10    16    >   FETCH_DIM_R                                      ~11     !1, 'host'
         17        ECHO                                                     ~11
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.17 ms | 1395 KiB | 17 Q