3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = 'http://apache/www.posters.cz/js/default.js'; $stuff = ""; if(strpos($path, 'http://') !== false) { $stuff = preg_replace('/http://[a-z|.|0-9]*/', '', $path); } var_dump($stuff);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/ME8Hj
function name:  (null)
number of ops:  18
compiled vars:  !0 = $path, !1 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapache%2Fwww.posters.cz%2Fjs%2Fdefault.js'
    3     1        ASSIGN                                                   !1, ''
    5     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'http%3A%2F%2F'
          5        DO_ICALL                                         $4      
          6        TYPE_CHECK                                  1018          $4
          7      > JMPZ                                                     ~5, ->14
    6     8    >   INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%2Fhttp%3A%2F%2F%5Ba-z%7C.%7C0-9%5D%2A%2F'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
    9    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.03 ms | 1395 KiB | 19 Q