3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "hello", "hello:me", "hello::me", "::me", "hello::hello::me", ]; foreach ($tests as $test) { preg_match_all('/([^:]+)::(.+)/', $test, $matches); print_r($matches); echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/qWi4K
function name:  (null)
number of ops:  15
compiled vars:  !0 = $tests, !1 = $test, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $4      !0, ->13
          2    > > FE_FETCH_R                                               $4, !1, ->13
   12     3    >   INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%2F%28%5B%5E%3A%5D%2B%29%3A%3A%28.%2B%29%2F'
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !2
          7        DO_ICALL                                                 
   13     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   14    11        ECHO                                                     '%0A'
   11    12      > JMP                                                      ->2
         13    >   FE_FREE                                                  $4
   15    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.67 ms | 1394 KiB | 17 Q