3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($id) { if ($id (is_numeric($id) || $id === 'pass')) { return true; } return false; } var_dump(test(null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nDcjd
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 null
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/nDcjd
function name:  test
number of ops:  14
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_DYNAMIC_CALL                                        !0
          2        INIT_FCALL                                               'is_numeric'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > JMPNZ_EX                                         ~2      $1, ->8
          6    >   IS_IDENTICAL                                     ~3      !0, 'pass'
          7        BOOL                                             ~2      ~3
          8    >   SEND_VAL_EX                                              ~2
          9        DO_FCALL                                      0  $4      
         10      > JMPZ                                                     $4, ->12
    5    11    > > RETURN                                                   <true>
    8    12    > > RETURN                                                   <false>
    9    13*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.62 ms | 1397 KiB | 18 Q