3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function handle($users) { var_dump($this->pushUsersToQueue($users)); } private function allUsersPushed($users) { return count($users) <= 0; } private function pushUsersToQueue($users) { if (! $this->allUsersPushed($users)) { return false; } var_dump("run the foreach"); } } $a = new Foo; $b = new Foo; $a->handle([1,2,3,4]); print "\n--------------------------------\n"; $b->handle([]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KNVZ7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   29     3        NEW                                              $5      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   31     6        INIT_METHOD_CALL                                         !0, 'handle'
          7        SEND_VAL_EX                                              <array>
          8        DO_FCALL                                      0          
   32     9        ECHO                                                     '%0A--------------------------------%0A'
   33    10        INIT_METHOD_CALL                                         !1, 'handle'
         11        SEND_VAL_EX                                              <array>
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Foo:
Function handle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KNVZ7
function name:  handle
number of ops:  8
compiled vars:  !0 = $users
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'var_dump'
          2        INIT_METHOD_CALL                                         'pushUsersToQueue'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
   10     7      > RETURN                                                   null

End of function handle

Function alluserspushed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KNVZ7
function name:  allUsersPushed
number of ops:  5
compiled vars:  !0 = $users
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        COUNT                                            ~1      !0
          2        IS_SMALLER_OR_EQUAL                              ~2      ~1, 0
          3      > RETURN                                                   ~2
   15     4*     > RETURN                                                   null

End of function alluserspushed

Function pushuserstoqueue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KNVZ7
function name:  pushUsersToQueue
number of ops:  11
compiled vars:  !0 = $users
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_METHOD_CALL                                         'allUsersPushed'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->7
   21     6    > > RETURN                                                   <false>
   24     7    >   INIT_FCALL                                               'var_dump'
          8        SEND_VAL                                                 'run+the+foreach'
          9        DO_ICALL                                                 
   25    10      > RETURN                                                   null

End of function pushuserstoqueue

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.4 ms | 1400 KiB | 15 Q