3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lib_path = 'core/modules/statistics/statistics.js'; $re = '/<script src=".*?' . preg_quote($lib_path, '/.') . '.*?">/is'; $content = 'Some content <script src="http://example.com/core/modules/statistics/statistics.js"></script> Etc.'; echo preg_quote($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/jN4I5
function name:  (null)
number of ops:  21
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                                               'preg_quote'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2F.'
          4        DO_ICALL                                         $4      
          5        CONCAT                                           ~5      '%2F%3Cscript+src%3D%22.%2A%3F', $4
          6        CONCAT                                           ~6      ~5, '.%2A%3F%22%3E%2Fis'
          7        ASSIGN                                                   !1, ~6
    5     8        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     9        INIT_FCALL                                               'preg_quote'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        ECHO                                                     $9
   11    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'preg_match'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.02 ms | 1395 KiB | 19 Q