3v4l.org

run code in 300+ PHP versions simultaneously
<?php $error = array("property" => "", "message" => "the property whatever is required"); if (empty($error['property']) && preg_match("/is required$/", $error['message']) && preg_match("/the property (.+) is required/", $error['message'], $matches)) { var_dump($matches); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/1rhDv
function name:  (null)
number of ops:  22
compiled vars:  !0 = $error, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ISSET_ISEMPTY_DIM_OBJ                         1  ~3      !0, 'property'
          2      > JMPZ_EX                                          ~3      ~3, ->9
          3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2Fis+required%24%2F'
          5        FETCH_DIM_R                                      ~4      !0, 'message'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        BOOL                                             ~3      $5
          9    > > JMPZ_EX                                          ~3      ~3, ->17
         10    >   INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%2Fthe+property+%28.%2B%29+is+required%2F'
         12        FETCH_DIM_R                                      ~6      !0, 'message'
         13        SEND_VAL                                                 ~6
         14        SEND_REF                                                 !1
         15        DO_ICALL                                         $7      
         16        BOOL                                             ~3      $7
         17    > > JMPZ                                                     ~3, ->21
    4    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
    5    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.28 ms | 1395 KiB | 17 Q