3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'http://google.com?omg=wtf'; echo preg_replace('/(http|https):\/\/(google.com)/is', 'https://$2', $foo) . "\n"; echo parse_url($foo, PHP_URL_SCHEME);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrOB4
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fgoogle.com%3Fomg%3Dwtf'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28http%7Chttps%29%3A%5C%2F%5C%2F%28google.com%29%2Fis'
          3        SEND_VAL                                                 'https%3A%2F%2F%242'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
    6     8        INIT_FCALL                                               'parse_url'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 0
         11        DO_ICALL                                         $4      
         12        ECHO                                                     $4
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.85 ms | 1394 KiB | 17 Q