3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lib_path = 'core/modules/statistics/statistics.js'; $re = '/(<script src=").*?(' . addslashes($lib_path) . ').*?(">)/is'; $content = 'Some content <script src="http://example.com/core/modules/statistics/statistics.js"></script> Etc.'; echo addslashes($lib_path); var_dump(preg_match($re, $content));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gfUdT
function name:  (null)
number of ops:  20
compiled vars:  !0 = $lib_path, !1 = $re, !2 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'core%2Fmodules%2Fstatistics%2Fstatistics.js'
    4     1        INIT_FCALL                                               'addslashes'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        CONCAT                                           ~5      '%2F%28%3Cscript+src%3D%22%29.%2A%3F%28', $4
          5        CONCAT                                           ~6      ~5, '%29.%2A%3F%28%22%3E%29%2Fis'
          6        ASSIGN                                                   !1, ~6
    5     7        ASSIGN                                                   !2, 'Some+content%0A%3Cscript+src%3D%22http%3A%2F%2Fexample.com%2Fcore%2Fmodules%2Fstatistics%2Fstatistics.js%22%3E%3C%2Fscript%3E%0AEtc.'
    9     8        INIT_FCALL                                               'addslashes'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        ECHO                                                     $9
   11    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'preg_match'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.22 ms | 1395 KiB | 19 Q