3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($expected, $estado) { foreach ((array) $estado as $estado) { if ($expected === $estado) { return 'true'; } } return 'false'; } echo check(1, 1), "\n"; echo check(1, 2), "\n"; echo check(1, array(1, 2)), "\n"; echo check(1, array(2, 3)), "\n"; echo check(1, array(3, 2, 1)), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6jgX
function name:  (null)
number of ops:  31
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'check'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5        ECHO                                                     '%0A'
   17     6        INIT_FCALL                                               'check'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 2
          9        DO_FCALL                                      0  $1      
         10        ECHO                                                     $1
         11        ECHO                                                     '%0A'
   18    12        INIT_FCALL                                               'check'
         13        SEND_VAL                                                 1
         14        SEND_VAL                                                 <array>
         15        DO_FCALL                                      0  $2      
         16        ECHO                                                     $2
         17        ECHO                                                     '%0A'
   19    18        INIT_FCALL                                               'check'
         19        SEND_VAL                                                 1
         20        SEND_VAL                                                 <array>
         21        DO_FCALL                                      0  $3      
         22        ECHO                                                     $3
         23        ECHO                                                     '%0A'
   20    24        INIT_FCALL                                               'check'
         25        SEND_VAL                                                 1
         26        SEND_VAL                                                 <array>
         27        DO_FCALL                                      0  $4      
         28        ECHO                                                     $4
         29        ECHO                                                     '%0A'
         30      > RETURN                                                   1

Function check:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/s6jgX
function name:  check
number of ops:  13
compiled vars:  !0 = $expected, !1 = $estado
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CAST                                          7  ~2      !1
          3      > FE_RESET_R                                       $3      ~2, ->10
          4    > > FE_FETCH_R                                               $3, !1, ->10
    7     5    >   IS_IDENTICAL                                             !0, !1
          6      > JMPZ                                                     ~4, ->9
    9     7    >   FE_FREE                                                  $3
          8      > RETURN                                                   'true'
    5     9    > > JMP                                                      ->4
         10    >   FE_FREE                                                  $3
   13    11      > RETURN                                                   'false'
   14    12*     > RETURN                                                   null

End of function check

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.88 ms | 1402 KiB | 18 Q