3v4l.org

run code in 300+ PHP versions simultaneously
<?php $peopleHunter = dbh->query("SELECT * From STAFF"); $peopleHunter->execute(); foreach ($peopleHunter as $Dude) { $countItems = dbh->query("SELECT count(*) FROM table WHERE ItemID='1' AND User='$Dude'")->fetchColumn(); if ($countItems == 0) { echo "Empty"; } else { echo "Derp"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 25
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/NMnnT
function name:  (null)
number of ops:  27
compiled vars:  !0 = $peopleHunter, !1 = $Dude, !2 = $countItems
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_CONSTANT                                   ~3      'dbh'
          1        INIT_METHOD_CALL                                         ~3, 'query'
          2        SEND_VAL_EX                                              'SELECT+%2A+From+STAFF'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !0, $4
    3     5        INIT_METHOD_CALL                                         !0, 'execute'
          6        DO_FCALL                                      0          
    4     7      > FE_RESET_R                                       $7      !0, ->25
          8    > > FE_FETCH_R                                               $7, !1, ->25
    5     9    >   FETCH_CONSTANT                                   ~8      'dbh'
         10        INIT_METHOD_CALL                                         ~8, 'query'
         11        ROPE_INIT                                     3  ~10     'SELECT+count%28%2A%29+FROM+table+WHERE+ItemID%3D%271%27+AND+User%3D%27'
         12        ROPE_ADD                                      1  ~10     ~10, !1
         13        ROPE_END                                      2  ~9      ~10, '%27'
         14        SEND_VAL_EX                                              ~9
         15        DO_FCALL                                      0  $12     
         16        INIT_METHOD_CALL                                         $12, 'fetchColumn'
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                                   !2, $13
    6    19        IS_EQUAL                                                 !2, 0
         20      > JMPZ                                                     ~15, ->23
    7    21    >   ECHO                                                     'Empty'
         22      > JMP                                                      ->24
   10    23    >   ECHO                                                     'Derp'
    4    24    > > JMP                                                      ->8
         25    >   FE_FREE                                                  $7
   12    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.06 ms | 1399 KiB | 13 Q