3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr =[ "id" => "integer:>0", "interval_id" => "string:!empty", "miles" => "integer:optional", "kms" => "integer:optional", "created_by" => "string:!empty|null", "created_at" => "integer:>0|null", "updated_by" => "string:!empty|null", "updated_at" => "integer:>0|null" ]; foreach ($arr as $key => $value) { // echo $key, "==>", $value, "\n"; if ( substr_count($value, 'optional')){ echo $key, "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/gMIIU
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1      > FE_RESET_R                                       $4      !0, ->12
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->12
          3    >   ASSIGN                                                   !2, ~5
   15     4        INIT_FCALL                                               'substr_count'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 'optional'
          7        DO_ICALL                                         $7      
          8      > JMPZ                                                     $7, ->11
   16     9    >   ECHO                                                     !2
         10        ECHO                                                     '%0A'
   13    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $4
   19    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.2 ms | 1394 KiB | 15 Q