3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = "2008"; $range = "2008-2013"; $shite = "2008-20013"; $regex = "/(\d{0,4}+(?:-\d{0,4}+)?)/is"; $matches = array(array()); preg_match($regex, $range, $matches[0]); preg_match($regex, $year, $matches[1]); preg_match($regex, $shite, $matches[2]); print_r($matches); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igosG
function name:  (null)
number of ops:  27
compiled vars:  !0 = $year, !1 = $range, !2 = $shite, !3 = $regex, !4 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2008'
    4     1        ASSIGN                                                   !1, '2008-2013'
    5     2        ASSIGN                                                   !2, '2008-20013'
    7     3        ASSIGN                                                   !3, '%2F%28%5Cd%7B0%2C4%7D%2B%28%3F%3A-%5Cd%7B0%2C4%7D%2B%29%3F%29%2Fis'
    8     4        ASSIGN                                                   !4, <array>
   10     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !1
          8        FETCH_DIM_W                                      $10     !4, 0
          9        SEND_REF                                                 $10
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAR                                                 !3
         13        SEND_VAR                                                 !0
         14        FETCH_DIM_W                                      $12     !4, 1
         15        SEND_REF                                                 $12
         16        DO_ICALL                                                 
   12    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAR                                                 !3
         19        SEND_VAR                                                 !2
         20        FETCH_DIM_W                                      $14     !4, 2
         21        SEND_REF                                                 $14
         22        DO_ICALL                                                 
   14    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   16    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.96 ms | 1395 KiB | 17 Q