3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Ala ma 2 koty, Adam ma 4 psy"; preg_match_all("/(?P&lt;kto&gt;[A-Z]\w+)\s\w+\s(?P&lt;ile&gt;\d+)/", $str, $matches); print $matches[0][0] . "\n"; print $matches[0][1] . "\n"; print $matches[1][0] . "\n"; print $matches[1][1] . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHEQ0
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Ala+ma+2+koty%2C+Adam+ma+4+psy'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3FP%26lt%3Bkto%26gt%3B%5BA-Z%5D%5Cw%2B%29%5Cs%5Cw%2B%5Cs%28%3FP%26lt%3Bile%26gt%3B%5Cd%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        FETCH_DIM_R                                      ~4      !1, 0
          7        FETCH_DIM_R                                      ~5      ~4, 0
          8        CONCAT                                           ~6      ~5, '%0A'
          9        ECHO                                                     ~6
    6    10        FETCH_DIM_R                                      ~7      !1, 0
         11        FETCH_DIM_R                                      ~8      ~7, 1
         12        CONCAT                                           ~9      ~8, '%0A'
         13        ECHO                                                     ~9
    7    14        FETCH_DIM_R                                      ~10     !1, 1
         15        FETCH_DIM_R                                      ~11     ~10, 0
         16        CONCAT                                           ~12     ~11, '%0A'
         17        ECHO                                                     ~12
    8    18        FETCH_DIM_R                                      ~13     !1, 1
         19        FETCH_DIM_R                                      ~14     ~13, 1
         20        CONCAT                                           ~15     ~14, '%0A'
         21        ECHO                                                     ~15
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.2 ms | 1386 KiB | 15 Q