3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/([A-Z][a-z]*)(\d*[-+]?)/'; $str = 'K+ Cr7+ O2-'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jGpYf
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%5BA-Z%5D%5Ba-z%5D%2A%29%28%5Cd%2A%5B-%2B%5D%3F%29%2F'
    4     1        ASSIGN                                                       !1, 'K%2B%0ACr7%2B%0AO2-'
    8     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                                                     
   10     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.96 ms | 2082 KiB | 15 Q