3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'a{ra:calc(*(la)100%);font-s'; $calc_regex = '(?<=:| |,|\\(|\\))(calc)\\s*(\\()\\s*((?:[^()]+|\\((?2)\\))*?)\\s*(\\))'; $string = preg_match('/'.$calc_regex.'/si', $string, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/adjr3
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string, !1 = $calc_regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%7Bra%3Acalc%28%2A%28la%29100%25%29%3Bfont-s'
    3     1        ASSIGN                                                   !1, '%28%3F%3C%3D%3A%7C+%7C%2C%7C%5C%28%7C%5C%29%29%28calc%29%5Cs%2A%28%5C%28%29%5Cs%2A%28%28%3F%3A%5B%5E%28%29%5D%2B%7C%5C%28%28%3F2%29%5C%29%29%2A%3F%29%5Cs%2A%28%5C%29%29'
    4     2        INIT_FCALL                                               'preg_match'
          3        CONCAT                                           ~5      '%2F', !1
          4        CONCAT                                           ~6      ~5, '%2Fsi'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !2
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !0, $7
    5    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.33 ms | 1394 KiB | 17 Q