3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = [ ['id' => 13, 'pets' => 8], ['id' => 15, 'pets' => 8], ['id' => 16, 'pets' => 10], ['id' => 17, 'pets' => 9], ['id' => 18, 'pets' => 10], ['id' => 19, 'pets' => 10], ['id' => 20, 'pets' => 0], ['id' => 21, 'pets' => 8], ['id' => 22, 'pets' => 9], ['id' => 23, 'pets' => 4], ['id' => 24, 'pets' => 0], ['id' => 40, 'pets' => 8], ['id' => 43, 'pets' => 2], ]; shuffle($test); echo implode(',', array_column(array_slice($test, -5), 'id'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZlduX
function name:  (null)
number of ops:  18
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'shuffle'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   20     4        INIT_FCALL                                               'implode'
          5        SEND_VAL                                                 '%2C'
          6        INIT_FCALL                                               'array_column'
          7        INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 -5
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        SEND_VAL                                                 'id'
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                         $5      
         16        ECHO                                                     $5
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.02 ms | 1002 KiB | 17 Q