3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '^(/|https?://)?'; var_dump(preg_match('/' . $regex . '/u', ''));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hPCA3
function name:  (null)
number of ops:  11
compiled vars:  !0 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5E%28%2F%7Chttps%3F%3A%2F%2F%29%3F'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_match'
          3        CONCAT                                           ~2      '%2F', !0
          4        CONCAT                                           ~3      ~2, '%2Fu'
          5        SEND_VAL                                                 ~3
          6        SEND_VAL                                                 ''
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.86 ms | 997 KiB | 15 Q