3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "101010101"; $pattern = "/[01]{1,4}/"; $blocks = preg_match_all ($pattern, $subject, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FMmWK
function name:  (null)
number of ops:  13
compiled vars:  !0 = $subject, !1 = $pattern, !2 = $blocks, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '101010101'
    4     1        ASSIGN                                                   !1, '%2F%5B01%5D%7B1%2C4%7D%2F'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !3
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    7     8        INIT_FCALL                                               'print_r'
          9        FETCH_DIM_R                                      ~8      !3, 0
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.03 ms | 1010 KiB | 15 Q