3v4l.org

run code in 300+ PHP versions simultaneously
<?php $where = array('bla = :bla_kip2' => 12); $expression = null; foreach($where as $cond => $term) { if(preg_match('/(:\S+)/', $cond, $matches)) { $expression = $matches[1]; } } echo $expression;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/sj3oY
function name:  (null)
number of ops:  17
compiled vars:  !0 = $where, !1 = $expression, !2 = $term, !3 = $cond, !4 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, null
    4     2      > FE_RESET_R                                       $7      !0, ->14
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->14
          4    >   ASSIGN                                                   !3, ~8
    5     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%28%3A%5CS%2B%29%2F'
          7        SEND_VAR                                                 !3
          8        SEND_REF                                                 !4
          9        DO_ICALL                                         $10     
         10      > JMPZ                                                     $10, ->13
    6    11    >   FETCH_DIM_R                                      ~11     !4, 1
         12        ASSIGN                                                   !1, ~11
    4    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $7
    9    15        ECHO                                                     !1
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.9 ms | 1395 KiB | 15 Q