3v4l.org

run code in 500+ PHP versions simultaneously
<?php $regex = '#[\-\d]$#'; $regex2 = '#[\\-\d]$#'; $regex3 = '#[\\\-\d]$#'; $value = '12-4'; preg_match($regex, $value, $matches); var_dump($matches); preg_match($regex2, $value, $matches); var_dump($matches); preg_match($regex3, $value, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HOedn
function name:  (null)
number of ops:  29
compiled vars:  !0 = $regex, !1 = $regex2, !2 = $regex3, !3 = $value, !4 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%23%5B%5C-%5Cd%5D%24%23'
    4     1        ASSIGN                                                       !1, '%23%5B%5C-%5Cd%5D%24%23'
    5     2        ASSIGN                                                       !2, '%23%5B%5C%5C-%5Cd%5D%24%23'
    7     3        ASSIGN                                                       !3, '12-4'
    9     4        INIT_FCALL                                                   'preg_match'
          5        SEND_VAR                                                     !0
          6        SEND_VAR                                                     !3
          7        SEND_REF                                                     !4
          8        DO_ICALL                                                     
   10     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !4
         11        DO_ICALL                                                     
   12    12        INIT_FCALL                                                   'preg_match'
         13        SEND_VAR                                                     !1
         14        SEND_VAR                                                     !3
         15        SEND_REF                                                     !4
         16        DO_ICALL                                                     
   13    17        INIT_FCALL                                                   'var_dump'
         18        SEND_VAR                                                     !4
         19        DO_ICALL                                                     
   15    20        INIT_FCALL                                                   'preg_match'
         21        SEND_VAR                                                     !2
         22        SEND_VAR                                                     !3
         23        SEND_REF                                                     !4
         24        DO_ICALL                                                     
   16    25        INIT_FCALL                                                   'var_dump'
         26        SEND_VAR                                                     !4
         27        DO_ICALL                                                     
         28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
141.25 ms | 2179 KiB | 15 Q