3v4l.org

run code in 300+ PHP versions simultaneously
<?php // example code $pattern = "#^/article/(?<id>\d+)-(?<slug>.+)$#"; $url = "/article/42-is-the-answer"; preg_match($pattern, $url, $args); print_r($args); $args = array_filter($args, 'is_string', ARRAY_FILTER_USE_KEY); print_r($args);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cGr4G
function name:  (null)
number of ops:  20
compiled vars:  !0 = $pattern, !1 = $url, !2 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%23%5E%2Farticle%2F%28%3F%3Cid%3E%5Cd%2B%29-%28%3F%3Cslug%3E.%2B%29%24%23'
    6     1        ASSIGN                                                   !1, '%2Farticle%2F42-is-the-answer'
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
   11    10        INIT_FCALL                                               'array_filter'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 'is_string'
         13        SEND_VAL                                                 2
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
   12    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.37 ms | 1001 KiB | 16 Q