3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m = array(); $x = "asdfadsf 'http://valami.lofasz?egy=ketto&harom=negy'blablabla"; preg_match("#\'(https?://[^\']+)\'#", $x, $m); $d = url_encode($m[1]); var_dump($d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KS3ns
function name:  (null)
number of ops:  17
compiled vars:  !0 = $m, !1 = $x, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 'asdfadsf+%27http%3A%2F%2Fvalami.lofasz%3Fegy%3Dketto%26harom%3Dnegy%27blablabla'
    7     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%23%5C%27%28https%3F%3A%2F%2F%5B%5E%5C%27%5D%2B%29%5C%27%23'
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !0
          6        DO_ICALL                                                 
    9     7        INIT_FCALL_BY_NAME                                       'url_encode'
          8        CHECK_FUNC_ARG                                           
          9        FETCH_DIM_FUNC_ARG                               $6      !0, 1
         10        SEND_FUNC_ARG                                            $6
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !2, $7
   12    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.73 ms | 1394 KiB | 17 Q