3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ppr($array){ echo '<pre>'; print_r($array); echo '</pre>'; } $brand = 'Fox'; $list = array('Ape','Bat','Cat','Dog','Elk','Fox','Gnu','Hen'); $list = array_diff($list,array($brand)); ppr($list); $list = array_diff($list,array($brand)); ppr($list); array_unshift($list,$brand); ppr($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EA6tS
function name:  (null)
number of ops:  28
compiled vars:  !0 = $brand, !1 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'Fox'
   11     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'array_diff'
          3        SEND_VAR                                                 !1
          4        INIT_ARRAY                                       ~4      !0
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   15     8        INIT_FCALL                                               'ppr'
          9        SEND_VAR                                                 !1
         10        DO_FCALL                                      0          
   17    11        INIT_FCALL                                               'array_diff'
         12        SEND_VAR                                                 !1
         13        INIT_ARRAY                                       ~8      !0
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !1, $9
   19    17        INIT_FCALL                                               'ppr'
         18        SEND_VAR                                                 !1
         19        DO_FCALL                                      0          
   21    20        INIT_FCALL                                               'array_unshift'
         21        SEND_REF                                                 !1
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
   23    24        INIT_FCALL                                               'ppr'
         25        SEND_VAR                                                 !1
         26        DO_FCALL                                      0          
         27      > RETURN                                                   1

Function ppr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EA6tS
function name:  ppr
number of ops:  7
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     '%3Cpre%3E'
    5     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        ECHO                                                     '%3C%2Fpre%3E'
    7     6      > RETURN                                                   null

End of function ppr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.25 ms | 1399 KiB | 22 Q