3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?:ID: )(\d+)/m'; $str = 'How many points would you like to add or subtract? (Note: Key a negative number to deduct points) The following user will be updated: ID: 13 Name: Alex Company: Unknown Current Points: 2'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result echo $matches[0][1];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bChBi
function name:  (null)
number of ops:  13
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%3F%3AID%3A+%29%28%5Cd%2B%29%2Fm'
    4     1        ASSIGN                                                   !1, 'How+many+points+would+you+like+to+add+or+subtract%3F%0A%28Note%3A+Key+a+negative+number+to+deduct+points%29%0A%0AThe+following+user+will+be+updated%3A%0A%0AID%3A+13%0AName%3A+Alex%0ACompany%3A+Unknown%0ACurrent+Points%3A+2'
   14     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
   17     9        FETCH_DIM_R                                      ~6      !2, 0
         10        FETCH_DIM_R                                      ~7      ~6, 1
         11        ECHO                                                     ~7
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.09 ms | 996 KiB | 14 Q