3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.93 ms | 1395 KiB | 15 Q