3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "I will turn 30\non January 5"; $regex = '/(\d+).*?on ([^ ]+) (\d+)/s'; if (preg_match($regex, $str, $matches)) { echo 'Age = ' . $matches[1] . "\n"; echo 'Month = ' . $matches[2] . "\n"; echo 'Day = ' . $matches[3] . "\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/e6Wnh
function name:  (null)
number of ops:  21
compiled vars:  !0 = $str, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'I+will+turn+30%0Aon+January+5'
    4     1        ASSIGN                                                   !1, '%2F%28%5Cd%2B%29.%2A%3Fon+%28%5B%5E+%5D%2B%29+%28%5Cd%2B%29%2Fs'
    6     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7      > JMPZ                                                     $5, ->20
    7     8    >   FETCH_DIM_R                                      ~6      !2, 1
          9        CONCAT                                           ~7      'Age+%3D+', ~6
         10        CONCAT                                           ~8      ~7, '%0A'
         11        ECHO                                                     ~8
    8    12        FETCH_DIM_R                                      ~9      !2, 2
         13        CONCAT                                           ~10     'Month+%3D+', ~9
         14        CONCAT                                           ~11     ~10, '%0A'
         15        ECHO                                                     ~11
    9    16        FETCH_DIM_R                                      ~12     !2, 3
         17        CONCAT                                           ~13     'Day+%3D+', ~12
         18        CONCAT                                           ~14     ~13, '%0A'
         19        ECHO                                                     ~14
   11    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.44 ms | 1395 KiB | 15 Q