3v4l.org

run code in 300+ PHP versions simultaneously
<?php $actual = 'There was an error performing the requested operation. Please try again or contact us for assistance.'; $text = 'There was an error performing the requested operation. Please try again or contact us for assistance.'; $actual = preg_replace('/\s+/u', ' ', $actual); $regex = '/'.preg_quote($text, '/').'/ui'; $message = sprintf('The text "%s" appears in the text of this page, but it should not.', $text); var_dump(!preg_match($regex, $actual));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EXJUV
function name:  (null)
number of ops:  29
compiled vars:  !0 = $actual, !1 = $text, !2 = $regex, !3 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'There+was+an+error+performing+the+requested+operation.+Please+try+again+or+contact+us+for+assistance.'
    5     1        ASSIGN                                                   !1, 'There+was+an+error+performing+the+requested+operation.+Please+try+again+or+contact+us+for+assistance.'
    7     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5Cs%2B%2Fu'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
    8     8        INIT_FCALL                                               'preg_quote'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%2F'
         11        DO_ICALL                                         $8      
         12        CONCAT                                           ~9      '%2F', $8
         13        CONCAT                                           ~10     ~9, '%2Fui'
         14        ASSIGN                                                   !2, ~10
    9    15        INIT_FCALL                                               'sprintf'
         16        SEND_VAL                                                 'The+text+%22%25s%22+appears+in+the+text+of+this+page%2C+but+it+should+not.'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !3, $12
   11    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'preg_match'
         22        SEND_VAR                                                 !2
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $14     
         25        BOOL_NOT                                         ~15     $14
         26        SEND_VAL                                                 ~15
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.72 ms | 1401 KiB | 23 Q