3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test= 2; $asd = "http://gogle.com/999/03/19/1988"; preg_match_all('^\d+/\d+/\d+^',$asd,$matches,PREG_PATTERN_ORDER); $arraylen = count($matches[0]); if(0 < $arraylen){ echo intval($matches[0][$arraylen-1]); }else{ echo -1; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pIKLY
function name:  (null)
number of ops:  21
compiled vars:  !0 = $test, !1 = $asd, !2 = $matches, !3 = $arraylen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    4     1        ASSIGN                                                   !1, 'http%3A%2F%2Fgogle.com%2F999%2F03%2F19%2F1988'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%5E%5Cd%2B%2F%5Cd%2B%2F%5Cd%2B%5E'
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 1
          7        DO_ICALL                                                 
    6     8        FETCH_DIM_R                                      ~7      !2, 0
          9        COUNT                                            ~8      ~7
         10        ASSIGN                                                   !3, ~8
    7    11        IS_SMALLER                                               0, !3
         12      > JMPZ                                                     ~10, ->19
    8    13    >   SUB                                              ~12     !3, 1
         14        FETCH_DIM_R                                      ~11     !2, 0
         15        FETCH_DIM_R                                      ~13     ~11, ~12
         16        CAST                                          4  ~14     ~13
         17        ECHO                                                     ~14
         18      > JMP                                                      ->20
   10    19    >   ECHO                                                     -1
   11    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.49 ms | 1395 KiB | 15 Q