3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "* @method static CIAO()\nsaddsa\n* @method static LOL() "; $matches = []; preg_match_all('/^\\s*\\*\\s*@method\\s+static\\s+([A-Z]+)\\(\\)\\s*$/m', $str, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hSoAD
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2A+%40method+static+CIAO%28%29%0Asaddsa%0A%2A+%40method+static+LOL%28%29+++'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%5E%5Cs%2A%5C%2A%5Cs%2A%40method%5Cs%2Bstatic%5Cs%2B%28%5BA-Z%5D%2B%29%5C%28%5C%29%5Cs%2A%24%2Fm'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.15 ms | 1398 KiB | 17 Q