3v4l.org

run code in 500+ PHP versions simultaneously
<?php $permalink_structure = '/index2php/converter/%post_id%/'; $index = 'index.php'; $without_preg_quote = preg_match( '#^/*' . $index . '#', $permalink_structure ); $with_preg_quote = preg_match( '#^/*' . preg_quote( $index, '#' ) . '#', $permalink_structure ); echo 'Without preg_quote(): ', var_export( $without_preg_quote, true ), "\n"; echo 'With preg_quote(): ', var_export( $with_preg_quote, true ), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LQSOG
function name:  (null)
number of ops:  29
compiled vars:  !0 = $permalink_structure, !1 = $index, !2 = $without_preg_quote, !3 = $with_preg_quote
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2Findex2php%2Fconverter%2F%25post_id%25%2F'
    4     1        ASSIGN                                                       !1, 'index.php'
    5     2        CONCAT                                               ~6      '%23%5E%2F%2A', !1
          3        CONCAT                                               ~7      ~6, '%23'
          4        FRAMELESS_ICALL_2                preg_match          ~8      ~7, !0
          5        ASSIGN                                                       !2, ~8
    6     6        INIT_FCALL                                                   'preg_quote'
          7        SEND_VAR                                                     !1
          8        SEND_VAL                                                     '%23'
          9        DO_ICALL                                             $10     
         10        CONCAT                                               ~11     '%23%5E%2F%2A', $10
         11        CONCAT                                               ~12     ~11, '%23'
         12        FRAMELESS_ICALL_2                preg_match          ~13     ~12, !0
         13        ASSIGN                                                       !3, ~13
    8    14        ECHO                                                         'Without+preg_quote%28%29%3A+'
         15        INIT_FCALL                                                   'var_export'
         16        SEND_VAR                                                     !2
         17        SEND_VAL                                                     <true>
         18        DO_ICALL                                             $15     
         19        ECHO                                                         $15
         20        ECHO                                                         '%0A'
    9    21        ECHO                                                         'With+preg_quote%28%29%3A+'
         22        INIT_FCALL                                                   'var_export'
         23        SEND_VAR                                                     !3
         24        SEND_VAL                                                     <true>
         25        DO_ICALL                                             $16     
         26        ECHO                                                         $16
         27        ECHO                                                         '%0A'
         28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.02 ms | 1717 KiB | 15 Q