3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array('blah', "'", "\'/", 1, 0); foreach ($x as $y) { $invalid = (int)(!is_int($y) || (is_int($y) && $y < 1)); echo "{$invalid} - {$y}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/tMTcn
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x, !1 = $y, !2 = $invalid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->19
          2    > > FE_FETCH_R                                               $4, !1, ->19
    5     3    >   TYPE_CHECK                                   16  ~5      !1
          4        BOOL_NOT                                         ~6      ~5
          5      > JMPNZ_EX                                         ~6      ~6, ->11
          6    >   TYPE_CHECK                                   16  ~7      !1
          7      > JMPZ_EX                                          ~7      ~7, ->10
          8    >   IS_SMALLER                                       ~8      !1, 1
          9        BOOL                                             ~7      ~8
         10    >   BOOL                                             ~6      ~7
         11    >   CAST                                          4  ~9      ~6
         12        ASSIGN                                                   !2, ~9
    6    13        ROPE_INIT                                     4  ~12     !2
         14        ROPE_ADD                                      1  ~12     ~12, '+-+'
         15        ROPE_ADD                                      2  ~12     ~12, !1
         16        ROPE_END                                      3  ~11     ~12, '%0A'
         17        ECHO                                                     ~11
    4    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $4
    7    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.02 ms | 1394 KiB | 13 Q