3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orderNumber = '002086S023Y9'; if (preg_match('/(.*[A-Z])[0-9a-z]$/', $orderNumber, $matches) === 0) { echo $orderNumber; } echo $matches[1];
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/N769v
function name:  (null)
number of ops:  12
compiled vars:  !0 = $orderNumber, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '002086S023Y9'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28.%2A%5BA-Z%5D%29%5B0-9a-z%5D%24%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6        IS_IDENTICAL                                             $3, 0
          7      > JMPZ                                                     ~4, ->9
    4     8    >   ECHO                                                     !0
    7     9    >   FETCH_DIM_R                                      ~5      !1, 1
         10        ECHO                                                     ~5
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.11 ms | 1394 KiB | 15 Q