3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.46 ms | 1398 KiB | 13 Q