3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cats = ['spicy', 'fluffy', 'moe']; function crap(&$cats) { asort($cats); } function oops($cats) { echo current($cats); } crap($cats); oops($cats);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oPU5D
function name:  (null)
number of ops:  8
compiled vars:  !0 = $cats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'crap'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   14     4        INIT_FCALL                                               'oops'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function crap

Function oops:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oPU5D
function name:  oops
number of ops:  6
compiled vars:  !0 = $cats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'current'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ECHO                                                     $1
   11     5      > RETURN                                                   null

End of function oops

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.7 ms | 1402 KiB | 19 Q