3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('/(\Sstatus\S => \d)/', 'Array ( [status] => 1 [message] => Logged In Successfully. )', $matches ); if(!empty($matches)) { echo (int) $matches[0][strlen($matches[0]) -1]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/rG8vf
function name:  (null)
number of ops:  16
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%28%5CSstatus%5CS+%3D%3E+%5Cd%29%2F'
    4     2        SEND_VAL                                                 'Array+%28+%5Bstatus%5D+%3D%3E+1+%5Bmessage%5D+%3D%3E+Logged+In+Successfully.+%29'
    5     3        SEND_REF                                                 !0
    3     4        DO_ICALL                                                 
    8     5        ISSET_ISEMPTY_CV                                 ~2      !0
          6        BOOL_NOT                                         ~3      ~2
          7      > JMPZ                                                     ~3, ->15
   10     8    >   FETCH_DIM_R                                      ~5      !0, 0
          9        STRLEN                                           ~6      ~5
         10        SUB                                              ~7      ~6, 1
         11        FETCH_DIM_R                                      ~4      !0, 0
         12        FETCH_DIM_R                                      ~8      ~4, ~7
         13        CAST                                          4  ~9      ~8
         14        ECHO                                                     ~9
   11    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.32 ms | 1001 KiB | 14 Q