3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PushAndPull { private $queue=array(""); public function push($push) { array_push($this->$queue,$push); } public function pull() { return array_shift($this->$queue); } } $obj = new PushAndPull(); $obj->push(1); foreach($queue as $val) echo $val; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Rhdn6
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj, !1 = $queue, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $3      'PushAndPull'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   22     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
   23     6      > FE_RESET_R                                       $7      !1, ->10
          7    > > FE_FETCH_R                                               $7, !2, ->10
   24     8    >   ECHO                                                     !2
   23     9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $7
   25    11      > RETURN                                                   1

Class PushAndPull:
Function push:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rhdn6
function name:  push
number of ops:  7
compiled vars:  !0 = $push, !1 = $queue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'array_push'
          2        FETCH_OBJ_W                                      $2      !1
          3        SEND_REF                                                 $2
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   12     6      > RETURN                                                   null

End of function push

Function pull:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rhdn6
function name:  pull
number of ops:  6
compiled vars:  !0 = $queue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'array_shift'
          1        FETCH_OBJ_W                                      $1      !0
          2        SEND_REF                                                 $1
          3        DO_ICALL                                         $2      
          4      > RETURN                                                   $2
   18     5*     > RETURN                                                   null

End of function pull

End of class PushAndPull.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.28 ms | 1396 KiB | 17 Q